,former member wrote: ↑28 Jan 2018, 19:35The plugin's fine and I have checked it with jsonlint.
But the fun code doesn't work.
What I want to accomplish is that when there's traffic at the bus stop tile then it changes to another bus stop and then if there's no traffic, it reverts back to the original building.
Help me, fun masters
Have a look at the code here
Yes, let's:
Code: Select all
[
{
"type": "bus stop",
"width": 1.0,
"height": 1.0, //as former member said
"influence noise": 2.0,
"capacity": 10.0,
"influence management": 5.0,
"id": "leotollgatedown", //and up ;)
"frames": [
{
"bmp": "1 - Tollgate_Down_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Down_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Down_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Down_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Down_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
//additional frames needed below
{
"bmp": "1 - Tollgate_Up_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Up_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Up_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Up_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
},
{
"bmp": "1 - Tollgate_Up_Finish.png",
"w": 32.0,
"h": 32.0,
"count": "4"
}
],
"author": "TheOnly-LeoLeo- and Commander ABab",
"title": "Classic Toll Gates",
"text": "A couple of (decorative) tollgate for your expressway entrances or exits. But could also be a checking booth for ports or airports too.",
"price": 230.0,
"monthly price": 5.0,
"power": 2.0,
"fun": [
// go up frames
{"condition":{"type":"and",inner[{"type":"road usage","min": 1,"max": 100.0},{"type":"frame","frame":0}]},"actions": [{"type": "build","frame": 5}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min": 1,"max": 100.0},{"type":"frame","frame":1}]},"actions": [{"type": "build","frame": 6}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min": 1,"max": 100.0},{"type":"frame","frame":2}]},"actions": [{"type": "build","frame": 7}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min": 1,"max": 100.0},{"type":"frame","frame":3}]},"actions": [{"type": "build","frame": 8}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min": 1,"max": 100.0},{"type":"frame","frame":4}]},"actions": [{"type": "build","frame": 9}],"always":true,"ignore success":true},
//go back down frames below
{"condition":{"type":"and",inner[{"type":"road usage","min": 0,"max":0},{"type":"frame","frame":9}]},"actions": [{"type": "build","frame": 4}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min":0,"max":0},{"type":"frame","frame":8}]},"actions": [{"type": "build","frame": 3}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min": 0,"max":0},{"type":"frame","frame":7}]},"actions": [{"type": "build","frame": 2}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min": 0,"max":0},{"type":"frame","frame":6}]},"actions": [{"type": "build","frame": 1}],"always":true,"ignore success":true},
{"condition":{"type":"and",inner[{"type":"road usage","min": 0,"max":0},{"type":"frame","frame":5}]},"actions": [{"type": "build","frame": 0}],"always":true,"ignore success":true}
]
}
]