Jump to content
Xplorer4x4

Traffic Light Control?

Recommended Posts

i understand the concept of the programing and instalation of the traffic lights and all.... but, one question.... how do u set it up to make the lights turn red when the fire app. pulls out onto the ramp?.... i have working traffic lights... they just dont change when the Fire App. respond

Thanks,

Will

Link to comment
Share on other sites

So, in theorey would it be possible to say name stop signs traffic_1_2_3 and create a virtual object to make them function the same as a traffic light?

Not in that manner, else the stop sign won't work as a stopsign all the time: when the traffic lights of that set turn green, the traffic won't stop for the stop sign anymore. Creating a new script would be easier.

i understand the concept of the programing and instalation of the traffic lights and all.... but, one question.... how do u set it up to make the lights turn red when the fire app. pulls out onto the ramp?.... i have working traffic lights... they just dont change when the Fire App. respond

Thanks,

Will

You would have to adapt the alarm script.

Edited by pyrothijs
Link to comment
Share on other sites

Ah.... then iam screwed :( lol..... dont understand the scripts... dont wanna understand the scripts lol... oh well

Thanks Though ,

Will

Link to comment
Share on other sites

It's in the name of the traffic light, when you open the editor you will notice all trafic lights have names like these:

traffic_1_2_3

The first number (1) tells the game which set of lights it is. All sets with 1 will work at the same time. The second number (2) specifies the order in which the lights turn from green to orange to red. The light with a 1 there changes first, the ligt with a 2 changes after that etc. The last number (3) is the number of seconds each of the lights burns. So here green will burn 3 sec., then orange three sec and red 3 sec.

With each traffic light a virtual object named the same is used to stop the traffic before the light.

how do u get 2 traffic lights to go at the same time n/s e/w

Link to comment
Share on other sites

Not tested but try

traffic_1_1_3 - north

traffic_1_1_3 - south

traffic_1_2_3 - east

traffic_1_2_3 - west

but if you have traffic turning this may cause problems. For example, north bound traffic tried to turn left while south bound traffic is trying to go straight, your asking for pile ups, but if you get it just right you might be able to work it out.

Link to comment
Share on other sites

Not tested but try

traffic_1_1_3 - north

traffic_1_1_3 - south

traffic_1_2_3 - east

traffic_1_2_3 - west

but if you have traffic turning this may cause problems. For example, north bound traffic tried to turn left while south bound traffic is trying to go straight, your asking for pile ups, but if you get it just right you might be able to work it out.

i tried that and all the lights were green and cars would stop on green and wait till red like they each light was still operating on its own

Link to comment
Share on other sites

Wow. I've been wondering about this for a couple days now. I've wanted to know if it's possible to click the little alarm box for about 8 seconds have the lights right infront of it switch red... Which I'm guess this is exactly what yall are discussing here.

So both lights will need to be 3_2_8 ( if 3 is not already in use? ). I'm not entirely understanding what 2 does. Or can it be 3_1_8 if it's not a 4 way turn?

Would anyone mind listing the files that have these properties in them so I can look and understand this?

Link to comment
Share on other sites

I realise now that my logic on the stop light numbers was a failure... So... How do I run an underground cord for alarm-on = redlight ---- alarm-off = greenlight... and ignore the 1_2_3_4_5_10000

To do this... What needs to happen. Name a stoplight then tie that stop light into the alarm script station... Would it be that on alarm from fire_station_controlpanel2 that stoplight_station2one and stoplight_station2two would trigger an invisible cop holding up a sign and after that the actual lights would just be for show... Or can we tie in some pretty red lights flashing on a post above the street? I'm guessing the content in this thread does not help with what I'm actually wanting to do. :/

Link to comment
Share on other sites

I'm sure there is a complicated way to do it, but I like the KISS method

Theoretically, you could just have an object that when you press alarm, it also triggers a stop command for objects named Stopblock_1 and stopblock_2

When the alarm shuts off, so does the stop command, allowing traffic to flow again

Link to comment
Share on other sites

So in theory... You could set up tons of tiny boxes at every intersection and set them to when you click an action button it stops traffic going that particular way despite what the light says if you place the action zone before the lights action zone? or stop a whole intersection just by making the stop light like the control panel for the firestation? So all traffic no matter where they are at within the intersection... as long as they're in the blue zone they'll stop when the command is issued and go when it's turned off? Am I understanding how this works right?

Link to comment
Share on other sites

Well I was thining more along the lines of the halt vehicle command, that personnel have, and it orders cars in front of it to stop...

This is the most simple thing I can think of... press the button, it stops traffic in front of it, press it again, it lets traffic flow again.. Have maybe so when you press on, the "special light" comes on...

Link to comment
Share on other sites

Yes... well... I was just going overly happy with it. I guess this would be pretty simple... So can we get this ( http://www.mountprospect.org/services/fire...tment/fire3.jpg ) on a grander scale? Like a large red flashing light on a across the road stop light... minus the normal stop lights?

Edit:

Alright... I'm going to double post since it's been over an hour. ( Feel free to merge it if yall want ).

So I created another fire station control panel and named it "station2stop' I also created a virtual object by the same name. Inside the editor.. I assigned the CP the stopvehicle and the alarm command already with it... So I'm guessing the question is how do I get it to trigger inside that zone... the stop command? I'm assuming this is added to a file... but I'm not understanding what I need to do script wise for this.

Link to comment
Share on other sites

i tried that and all the lights were green and cars would stop on green and wait till red like they each light was still operating on its own

I have no idea then. Just experiment.

It's very possible, maybe not as a traffic light control, but to have the alarm command also activate a stop command, similar to the halt vehicles command that personnel have..

I'm sure there is a complicated way to do it, but I like the KISS method

Theoretically, you could just have an object that when you press alarm, it also triggers a stop command for objects named Stopblock_1 and stopblock_2

When the alarm shuts off, so does the stop command, allowing traffic to flow again

Good ideas. I may see if I cant come up with some sort of way to make this work.

Link to comment
Share on other sites

So is anyone able to write the script for the stop boxes ( Not actually adding them to the map just placing them in a script ) because when I looked at it and see if I knew enough... I began to beat my head against a hard surface kind of like this ----> :wall:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...