Re: Cars & Roads: Flags
Posted: 13 Dec 2017, 17:50
But how can you add special things to the flag?
A feature rich city builder game for Android, iOS and PC
https://forum.theotown.com/
Code: Select all
"flag train":true
Code: Select all Reset
[ { "frames": [ { "bmp": "subaru_impreza.png", "count": 4, "h": 9, "w": 12 } ], "id": "subaru_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.7 }, { "frames": [ { "bmp": "mg_metro.png", "count": 4, "h": 8, "w": 11 } ], "id": "metro_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.5 }, { "frames": [ { "bmp": "ford_focus.png", "count": 4, "h": 8, "w": 11 } ], "id": "focus_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.6 }, { "frames": [ { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 } ], "id": "offroad_road_dirt", "speed": 1.5, "allocate flag": "rallycars", "type": "road", "flag normal": false, "flag rallycars": true, "author": "yusuf8a684, Lobby and Theotheoderich", "category": "$offroad-addon", "draw ground": true, "height": 1, "price": 5, "text": "Dirt off-road roads are a bit slower than asphalt off-road roads", "title": "Dirt Off-Road Road", "width": 1, "level": 0, "one way": true, "flag pkw": false, "flag lkw": false, "flag tram": false }, { "author": "yusuf8a684, Lobby and Theotheoderich", "category": "$offroad-addon", "allocate flag": "rallycars", "draw ground": true, "frames": [ { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 } ], "height": 1, "id": "offroad_road", "price": 10, "text": "Asphalt off-road roads are little bit faster than dirt off-road roads", "title": "Asphalt Off-road Road", "type": "road", "width": 1, "level": 1, "one way": true, "speed": 2, "flag rallycars": true, "flag normal": false, "flag tram": false, "flag pkw": false, "flag lkw": false }]
You need to actually spawn the cars through a building. This can be done by:yusuf8a684 wrote: ↑02 Mar 2021, 13:14I tried creating my own flag but still cars aren't spawning
Code: Select all Reset
[ { "frames": [ { "bmp": "subaru_impreza.png", "count": 4, "h": 9, "w": 12 } ], "id": "subaru_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.7 }, { "frames": [ { "bmp": "mg_metro.png", "count": 4, "h": 8, "w": 11 } ], "id": "metro_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.5 }, { "frames": [ { "bmp": "ford_focus.png", "count": 4, "h": 8, "w": 11 } ], "id": "focus_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.6 }, { "frames": [ { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 } ], "id": "offroad_road_dirt", "speed": 1.5, "allocate flag": "rallycars", "type": "road", "flag normal": false, "flag rallycars": true, "author": "yusuf8a684, Lobby and Theotheoderich", "category": "$offroad-addon", "draw ground": true, "height": 1, "price": 5, "text": "Dirt off-road roads are a bit slower than asphalt off-road roads", "title": "Dirt Off-Road Road", "width": 1, "level": 0, "one way": true, "flag pkw": false, "flag lkw": false, "flag tram": false }, { "author": "yusuf8a684, Lobby and Theotheoderich", "category": "$offroad-addon", "allocate flag": "rallycars", "draw ground": true, "frames": [ { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 } ], "height": 1, "id": "offroad_road", "price": 10, "text": "Asphalt off-road roads are little bit faster than dirt off-road roads", "title": "Asphalt Off-road Road", "type": "road", "width": 1, "level": 1, "one way": true, "speed": 2, "flag rallycars": true, "flag normal": false, "flag tram": false, "flag pkw": false, "flag lkw": false }]JSON checker
Code: Select all Reset
"car spawner":[{ "cars":["metro_offroad_racecar","subaru_offroad_racecar"], //Put in the ids of the cars of cars "radius":10, //Put in the area you want them to spawn in "count":3 //Put in how many you want to spawn }]
Thank you for your help but they actually have spawners. Didn't put their codes hereImran M wrote: ↑02 Mar 2021, 16:23You need to actually spawn the cars through a building. This can be done by:yusuf8a684 wrote: ↑02 Mar 2021, 13:14I tried creating my own flag but still cars aren't spawning
Code: Select all Reset
[ { "frames": [ { "bmp": "subaru_impreza.png", "count": 4, "h": 9, "w": 12 } ], "id": "subaru_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.7 }, { "frames": [ { "bmp": "mg_metro.png", "count": 4, "h": 8, "w": 11 } ], "id": "metro_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.5 }, { "frames": [ { "bmp": "ford_focus.png", "count": 4, "h": 8, "w": 11 } ], "id": "focus_offroad_racecar", "allocate flag": "rallycars", "type": "car", "v2": true, "flag rallycars": true, "flag normal": false, "speed": 1.6 }, { "frames": [ { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "dirt_offroad.png", "count": 16, "h": "16", "w": 32 } ], "id": "offroad_road_dirt", "speed": 1.5, "allocate flag": "rallycars", "type": "road", "flag normal": false, "flag rallycars": true, "author": "yusuf8a684, Lobby and Theotheoderich", "category": "$offroad-addon", "draw ground": true, "height": 1, "price": 5, "text": "Dirt off-road roads are a bit slower than asphalt off-road roads", "title": "Dirt Off-Road Road", "width": 1, "level": 0, "one way": true, "flag pkw": false, "flag lkw": false, "flag tram": false }, { "author": "yusuf8a684, Lobby and Theotheoderich", "category": "$offroad-addon", "allocate flag": "rallycars", "draw ground": true, "frames": [ { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 }, { "bmp": "asphalt_offroad.png", "count": 16, "h": "16", "w": 32 } ], "height": 1, "id": "offroad_road", "price": 10, "text": "Asphalt off-road roads are little bit faster than dirt off-road roads", "title": "Asphalt Off-road Road", "type": "road", "width": 1, "level": 1, "one way": true, "speed": 2, "flag rallycars": true, "flag normal": false, "flag tram": false, "flag pkw": false, "flag lkw": false }]JSON checkerAdd this code to a regular building and not the car, and I think it should workCode: Select all Reset
"car spawner":[{ "cars":["metro_offroad_racecar","subaru_offroad_racecar"], //Put in the ids of the cars of cars "radius":10, //Put in the area you want them to spawn in "count":3 //Put in how many you want to spawn }]JSON checker
I'm pretty sure that there's something called "target" where the cars go to a specific building, but I'm not sure about that part. You could check in the documentation for cars in this part of the forum.