ST Custom Toggle History - ironmonk108/monks-module-wiki GitHub Wiki
Runs different action threads depending on how many times the tile has been triggered using the modulo operator. This method uses tile history; you can also use variables, see Custom Toggle, Variable Method.
Optional: Add a Reset Tile Trigger History in the Even landing thread to reset the history so it doesn't bloat up your data.

- History:
On
-
Check Tile Trigger Count
- Trigger Count
% 2 == 0
- Trigger Count
- Landing
The Chat Messages are for informative purposes only.
Click here to view Tile Template JSON Data
Copy & paste this into Notepad and save it as a .JSON file. Then import it using MATT's Tile Templates.
{
"texture": {
"scaleX": 1,
"scaleY": 1,
"src": null,
"tint": "#ffffff",
"offsetX": 0,
"offsetY": 0,
"rotation": 0,
"anchorX": 0.5,
"anchorY": 0.5,
"fit": "fill",
"alphaThreshold": 0.75
},
"width": 100,
"height": 100,
"rotation": 0,
"elevation": 0,
"alpha": 1,
"occlusion": {
"mode": 1,
"alpha": 0
},
"video": {
"loop": true,
"autoplay": true,
"volume": 0
},
"flags": {
"monks-active-tiles": {
"active": true,
"record": true,
"restriction": "all",
"controlled": "all",
"trigger": [
"enter"
],
"allowpaused": false,
"usealpha": false,
"pointer": false,
"pertoken": false,
"minrequired": 0,
"chance": 100,
"fileindex": 0,
"actions": [
{
"action": "triggercount",
"data": {
"count": "% 2 == 0",
"unique": false,
"none": "Odd"
},
"id": "XkgoGDwu4cRFe9Mo"
},
{
"action": "anchor",
"data": {
"tag": "Even",
"stop": false
},
"id": "ZtJ4x31t59rcIRWr"
},
{
"action": "chatmessage",
"data": {
"flavor": "",
"text": "Even",
"entity": "",
"incharacter": false,
"chatbubble": false,
"language": "",
"showto": "everyone"
},
"id": "ZM3dRyNp3l9QdSmo"
},
{
"action": "anchor",
"data": {
"tag": "Odd",
"stop": true
},
"id": "h0LHZhzEJi6vE5kt"
},
{
"action": "chatmessage",
"data": {
"flavor": "",
"text": "Odd",
"entity": "",
"incharacter": false,
"chatbubble": false,
"language": "",
"showto": "everyone"
},
"id": "K7oppchZcXSFEWdc"
}
],
"files": [],
"vision": false,
"cooldown": null,
"name": "Custom_Toggle_History_v13.01"
},
"tagger": {
"tags": ""
}
},
"hidden": false,
"locked": false,
"sort": 100000,
"restrictions": {
"light": false,
"weather": false
},
"name": "Custom_Toggle_History_v13.01",
"visible": true,
"img": null,
"thumbnail": "modules/monks-active-tiles/img/cube.svg",
"folder": "qEhdNdIhbYVCtLRF"
}
- Foundry 13.351
- MATT 13.05