How can I make my bus hazards flash when I open any of my doors (1 Viewer)

Solution
Oh, of course, the blinker timer (the thing that makes the lights flash rather than always be on) won't be running... derp.
This might be a little more difficult to script than I first thought... :/

Advertisement

Nov 4, 2016
187
15
46
I wouldn't know what part of the script, but why would you want Hazards on when at the bus stop, buses just indicate in. They only put hazards on if they have to wait time.
Some buses where I live have automatic hazards on when doors open so I wanna follow suit lol. My best guess would be adding a code like when door open, hazards flash xD
 

Advertisement

Road-hog123

An Orange Bus
FF Council
UKDT
Add-on London Team
Dec 10, 2015
2,287
109
3,158
Kent, UK
roadhog123.co.uk
Pronouns
He/Him
Errr...what buses are these?
American ones perhaps?
What I mean is like automatically so when I open/close my doors they on and off.
In the "Script" folder inside the bus in question, you should have a file called something like "lights.osc". This can be opened with a normal plain-text editor such as Notepad.
I'm imagining that the A21 probably uses similar if not the same scripts as the SD202, in which case it will have a couple of lines like this:
Code:
(L.L.lights_sw_blinker) 1 = (L.L.lights_sw_warnblinker) || (L.L.lights_blinkgeber) && (L.L.elec_busbar_avail) sqr * (S.L.lights_blinker_l)
(L.L.lights_sw_blinker) 2 = (L.L.lights_sw_warnblinker) || (L.L.lights_blinkgeber) && (L.L.elec_busbar_avail) sqr * (S.L.lights_blinker_r)
Now, you're interested in the parts up to and including the || for each. These are the conditions for when the left and right indicators should be active. The first line has a check that the indicator ("blinker" in German) stalk is in the "left" position (1) and a check if the hazards ("warnblinker" in German) switch is on. If the stalk is left and/or the hazards switch is on, the left indicator lamps will flash (II is the symbol for "OR"). The second line has the same, but checks if the indicator stalk is right. What you can do is to add other conditions to this that will also cause the indicators to be on.
The door script saves the position of each door leaf in the bus into its own variable. These are door_0, door_1, door_2, etc. You can therefore add door_0 0.1 > || after the existing || and the hazards will also be on whenever the first door leaf is more than 10% open (which also happens to be how open they have to be to light the door light). You can add more of those for each of the leaves you want the hazards to be activated by.
Hopefully this helps. :)
 

Advertisement

Road-hog123

An Orange Bus
FF Council
UKDT
Add-on London Team
Dec 10, 2015
2,287
109
3,158
Kent, UK
roadhog123.co.uk
Pronouns
He/Him
With two doors each with 2 leaves, it becomes:
Code:
(L.L.lights_sw_blinker) 1 = (L.L.lights_sw_warnblinker) || (L.L.door_0) 0.1 > || (L.L.door_1) 0.1 > || (L.L.door_2) 0.1 > || (L.L.door_3) 0.1 > || (L.L.lights_blinkgeber) && (L.L.elec_busbar_avail) sqr * (S.L.lights_blinker_l)
(L.L.lights_sw_blinker) 2 = (L.L.lights_sw_warnblinker) || (L.L.door_0) 0.1 > || (L.L.door_1) 0.1 > || (L.L.door_2) 0.1 > || (L.L.door_3) 0.1 > || (L.L.lights_blinkgeber) && (L.L.elec_busbar_avail) sqr * (S.L.lights_blinker_r)
 

Advertisement

This thread is more than 7 years old.

Your message may be considered spam for the following reasons:

Users who are viewing this thread