Proper flags for cars

Find tutorials, documentation, and resources for creating and using TheoTown plugins.
Previous topicNext topic
User avatar
Lobby
Inhabitant of a Supercluster
Reactions:
Posts: 3759
Joined: 26 Oct 2008, 10:34
Plugins: Showcase Store

Proper flags for cars

Post by Lobby »

Hey, I want to inform you that since the flag interpretation of cars is the same as for roads the meaning of "flag normal":true (which is set by default) also enables the same flags. Namely flag normal will act as if you set

Code: Select all

"flag pkw":true,
"flag lkw":true,
"flag tractor":true,
"flag bus":true
The reason for that behavior is convenience when it comes to road definitions. However, for cars you usually don't want flags to be set that don't actually match your car's type (e.g. bus). Otherwise it could for example use roads that it's not supposed to.

To overcome that use

Code: Select all

"flag normal":false
and enable only the appropriate flags for your car afterwards :teach
User avatar
Imran M
Inhabitant of a Country
Reactions:
Posts: 834
Joined: 24 Oct 2018, 11:41
Plugins: Showcase Store

Plugin Creator

Platform

Re: Proper flags for cars

Post by Imran M »

Finally! A post that makes flags easier to understand! :D
I just love the DOPE-amine you get after completing a plugin!
y
yusuf8a684
Reactions:

Re: Proper flags for cars

Post by yusuf8a684 »

Lobby but how could we remove emergency vehicles and taxis from roads?
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3666
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Proper flags for cars

Post by JustAnyone »

Try

Code: Select all

"flag military":false
for removal of service cars, though it's not advised.
:pickle:
y
yusuf8a684
Reactions:

Re: Proper flags for cars

Post by yusuf8a684 »

JustAnyone wrote: 18 Jan 2019, 18:54 Try

Code: Select all

"flag military":false
for removal of service cars, though it's not advised.
Thanks but I hope it will deny taxis on it too
y
yusuf8a684
Reactions:

Re: Proper flags for cars

Post by yusuf8a684 »

What is the flag tag for fire engines?
y
yusuf8a684
Reactions:

Re: Proper flags for cars

Post by yusuf8a684 »

"flagairport":false,"flagambulance":false,"flagbus":false,"flaglkw":false,"flagmedic":false,"flagmilitary":false,"flagnormal":false,"flagpedestrian":false,"flagpkw":false,"flagpolice":false,"flagtaxi":false,"flagtractor":false,"flagtram":true,"flagtruck":false,"
That is me trying to ban all flags except tram lol :bb
User avatar
JustAnyone
Honorary Contributor
Reactions:
Posts: 3666
Joined: 23 Jul 2017, 10:45
Location: Easter Island
Plugins: Showcase Store

Platform

Re: Proper flags for cars

Post by JustAnyone »

Don't forget the space!
:pickle:
y
yusuf8a684
Reactions:

Re: Proper flags for cars

Post by yusuf8a684 »

JustAnyone wrote: 19 Jan 2019, 16:40 Don't forget the space!
I added spaces lol but still ambulances, taxis, fire engines, polices and semi trucks can go over it :(
Previous topicNext topic