Flags are used to make certain cars go only in certain roads. In the game it is used in the bus road.
First, you have to make a road with the flag
Code: Select all
[
{
"id":"$testroad00",
"type":"road",
"level":1,
"speed":2.0,
"frames":[{"bmp":"road.png","w":32,"h":16,"count":16}],
"flag normal":false, //No cars can go here
"flag pkw":true //But passenger cars can
}
]
Code: Select all
[
{
"id":"FranFran.carplugin00",
"type":"car",
"frames":[
{"bmp":"carsample.png","w":18,"h":12,"count":4}
],
"v2":true,
"flag normal":false, //this is not a normal car
"flag pkw":true //this is a passenger car!
}
]
Original topic
All possible flags:
"flag all"
"flag normal"
"flag pkw"
"flag lkw"
"flag bus"
"flag tram"
"flag airport"
"flag pedestrian"
"flag military"
"flag user0"
"flag user1"
...
"flag user9"
Lobby wrote: ↑13 Dec 2017, 12:40Version 390 will allow you to reference to your own flags by name. To allocate a flag that's called "lobby_newflag you may just writeTo use it, writeCode: Select all
"allocate flag":["lobby_newflag"] // "allocate flag":"lobby_newflag would work, too
You should add the definition above to every plugin which uses it (redefinition is therefore explicitly allowed). Just ensure that your flag name is some kind of unique.Code: Select all
"flag lobby_newflag":true
⚠There's a limit of 20 custom flags in total.