Hi guys,
I got a question.
I'm currently desiging a traffic light, but I want something which I didn't achieve yet.
So here is my traffic light;
Negenoog Rechtdoor Knipperend
[groups]
2
LetsRepaintIt
TrafficLights
[friendlyname]
Negenoog Rechtdoor Knipperend
[trafficlight]
[mesh]
Negenoog.o3d
[shadow]
[light_enh_2]
pos_x
pos_y
pos_z position
dir_x
dir_y
dir_z direction
up_x
up_y
up_z vector pointing up (if rotating = 2) or rotation axis (if rotating = 1)
omni 0 = directional light, 1 = omnidirectional light
rotating 0 = light effect will be directed to dir vector, 1 = light will rotate to user (around UP axis),
2 = light will rotate to user (around all axis)
r color
g color
b color
size meters
conesize_inner_angle degree, angle of inner cone (full brightness)
conesize_outer_angle degree, angle of outer cone (beginning of visibility)
fading_variable 0 = dark, 1 = normal, 2 = double, 0.5 = half brightness, if invalid, 1 will be constantly used
factor factor multiplied
z-offset offset of spot from position to user (if the light would
be inside of a solid object, you can make it visible
with this parameter; just set it e.g. two times of the
radius of the solid object.
parameters 0 = none
+ 1 = star
+ 2 = no fog effect
+ 4 = only effects
cone light will create cone effect (depends on fog and environmental brightness and only if it is no omnidirectional light)
timeconst time constant. It controls how much time the light will need to reach 63% of the illumination intensity
(or 27% in case of switch off)
bitmap effect texture (if "" then standard texture will be used)
[light_enh_2]
0.22
0
0.13
0
-20
0
0
0
1
0
0
255
0
0
0.10
20
50
Rood
10
0.8
0
0
0.1
[light_enh_2]
0.06
0
0.13
0
-20
0
0
0
1
0
0
255
0
0
0.10
20
50
Rood
10
0.8
0
0
0.1
[light_enh_2]
0.135
0
0.13
0
-20
0
0
0
1
0
0
240
140
0
0.10
20
50
Oranje
10
0.8
0
0
0.1
[light_enh_2]
0.135
0
0.21
0
-20
0
0
0
1
0
0
255
255
255
0.10
20
50
Wit
10
0.8
0
0
0.1
[light_enh_2]
0.135
0
0.06
0
-20
0
0
0
1
0
0
255
255
255
0.10
20
50
Wit
10
0.8
0
0
0.1
[mesh]
Rood.o3d
[visible]
Rood
1
[mesh]
Oranje.o3d
[visible]
Oranje
1
[mesh]
WitRechtdoor.o3d
[visible]
Knipper
1
[script]
1
script\ampel2.osc
[varnamelist]
1
script\ampel2_varlist.txt
[boundingbox]
0.3
0.55
1
0
-0.1
0
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
Ampel2.osc
'########################
'Traffic Light for Cars
'########################
'Traffic Light for Cars
'Phase 0..2: Rood
'Phase 3..8: Wit
'Phase 9..11: Oranje
'Else: off
'(c) 30.4.2008 Marcel Kuhnt
'Script Version: 1.0
'Omsi release: 1.0
'Needs:
'- none
{init}
0 (S.L.Timer)
0 (S.L.Wit)
{end}
{frame}
(L.L.TrafficLightPhase) s0
l0 0 >= l0 5 <= && (S.L.Rood)
l0 9 >= l0 11 <= && (S.L.Oranje)
l0 6 >= l0 8 <= && (S.L.Wit)
{end}
{frame}
(L.L.TrafficLightPhase) (S.L.Wit) =
{if}
0 (S.L.Timer)
{else}
(L.L.Timer) (L.S.Timegap) + (S.L.Timer) s0
1 >
{if}
0 (S.L.Timer)
0 (S.L.Wit)
{else}
l0 0.3 >
{if}
1 (S.L.Wit)
{endif}
{endif}
{endif}
{end}
Ampel2_varlist.osc
Rood
Oranje
Wit
Timer
Knipper
So what I want to achieve is that as soon as Phase 3 get's active, the light starts to blink, until Phase 8 is reached, then the orange light will show and after red will show.
This is an existing Dutch traffic light for buses and trams. Red is standard. After that it turns to white and starts to blink. After that the light turns Orange and after that Red again.
Can someone help me? I don't know what I'm doing wrong.. I thought this should work..
Thanks in advance!