Hello,
Although I understood the fire detection system. I encounter some difficulties in programming, indeed, my goal is quite complex, but I will really want to apply it.
In France, we have a driving aid system that is positioned below the traffic light. This box detects the bus and informs the situation of when it can pass or not, these are security measures.
I would like to put it on OMSI.
This is how it works:
Here, no bus is present, but when the fire is red, the orange diamond is considered a red light :
Here, the orange diamond flashes, indicating that it detected my bus :
Here, when the light turns green (error in the image), the orange diamond and blue exclamation point flashes throughout the "Green" :
And finally, when the light changes to orange, the orange diamond appears in a fixed manner:
Those are the steps.
A friend of mine has to model all this, no problem with each form per .o3d file!
- A file for orange diamond
- A file for orange diamond and exclamation point blue
- A file for blue exclamation point
Same, no worries for my objects published with OmsiObjEdit, I programmed them without any worries.
But where I block, it's on the scripts, I tried to fiddle as it should, but I still can not, here's where I am:
SAC.osc :
- '###########################
- 'Traffic Light Bus Priority
- '###########################
- 'Traffic Light Bus Priority type TCSP
- 'Phase 12: off
- 'Else: flashing Green
- '(c) 01.6.2010 Marcel Kuhnt
- 'Script Version: 1.2
- 'Omsi release: 1.0
- 'Needs:
- '- none
- {init}
- 0 (S.L.Timer)
- 1 (S.L.Green)
- {end}
- {frame}
- (L.L.TrafficLightPhase) 12 =
- {if}
- 0 (S.L.Timer)
- 0 (S.L.Green)
- {else}
- (L.L.Timer) (L.S.Timegap) + (S.L.Timer) s0
- 1 >
- {if}
- 0 (S.L.Timer)
- 1 (S.L.Green)
- {else}
- l0 0.5 >
- {if}
- 0 (S.L.Green)
- {endif}
- {endif}
- {endif}
- {end}
- {frame}
- (L.L.TrafficLightPhase) s0
- l0 0 >= l0 5 <= && (S.L.Red)
- l0 9 >= l0 11 <= && (S.L.Yellow)
- {end}
SAC_varlist.txt :
and .sco file :
- [groups]
- 3
- St-Servan
- Mobilier Urbain
- Variante noire
- [friendlyname]
- Sagem Aluxe SAC
- [trafficlight]
- [mesh]
- Sagem_Aluxe_SAC.o3d
- [mesh]
- Sagem_Aluxe_SAC_losange.o3d
- [visible]
- Red
- 1
- [mesh]
- Sagem_Aluxe_SAC_losange.o3d
- [visible]
- Yellow
- 1
- [mesh]
- Sagem_Aluxe_SAC_losange.o3d
- [visible]
- TrafficLightApproach
- 1
- [mesh]
- Sagem_Aluxe_SAC_losange-exclamation.o3d
- [visible]
- Green
- 1
- [script]
- 1
- script\SAC.osc
- [varnamelist]
- 1
- script\SAC_varlist.txt
- Detail-Faktor: hiermit kann eingestellt werden, ob das Objekt als größer oder kleiner angenommen wird.
- Der Wert wird einfach mit dem in den Graphik-Optionen eingestellten Wert multipliziert, d.h.:
- * 0.5 = Objekt wird bereits dargestellt, wenn es nur halb so groß ist, wie der eingestellte Wert
- * 1.0 = Objekt erscheint genau dann, wenn es so groß ist wie eingestellt
- * 2.0 = Objekt erscheint erst dann, wenn es schon doppelt so groß ist wie eingestellt.
- [detail_factor]
- 0.1
Do you have any idea how it works?
Thanks