//rainsted,dir=0
//info: robocza wersja podsypki pod zwrotnicê 33230mm
//parametry: 1:nazwa, 2:x, 3:y, 4:z, 5:obrót, 6:tekstura1, 7:tekstura2, 8:dodatek, 9:pochylenie
origin (p2) (p3) (p4)
rotate (p9) (p5) 0

node 100 0 (p1) eventlauncher 0 1 -1 4 t 0 (p1)ac (p1)ad end

// globalne (zewnetrzne) procedury sterujace:
event (p1)ac multiple 0 none (p1)_Wz6 (p1)_aV100 (p1)_a0 (p1)_b0 (p1)_c0 (p1)_d0 endevent
event (p1)bd multiple 0 none (p1)_Wz5 (p1)_bV100 (p1)_a0 (p1)_b0 (p1)_c0 (p1)_d0 endevent
event (p1)bc multiple 0 none (p1)_Wz8 (p1)_aV40  (p1)_a1 (p1)_b1 (p1)_c1 (p1)_d1 endevent
event (p1)ad multiple 0 none (p1)_Wz7 (p1)_bV40  (p1)_a1 (p1)_b1 (p1)_c1 (p1)_d1 endevent

// model latarni zwrotnika
node -1 0 (p1)_Wz model 2.28 -0.22 10.523 -3.17 WzK.t3d none lights 1 0 0 1 endmodel

// wyswietlanie wskazowek zwrotnika d b c a
event (p1)_Wz5 lights 0.8 (p1)_Wz 0 1 1 0 endevent
event (p1)_Wz6 lights 0.8 (p1)_Wz 1 0 0 1 endevent
event (p1)_Wz7 lights 0.8 (p1)_Wz 0 1 0 1 endevent
event (p1)_Wz8 lights 0.8 (p1)_Wz 1 0 1 0 endevent

// przelaczanie zwrotnic o nazwie (p1)a,b,c,d
event (p1)_a0 switch 0.0 (p1)a 0 endevent
event (p1)_a1 switch 0.0 (p1)a 1 endevent
event (p1)_b0 switch 0.0 (p1)b 0 endevent
event (p1)_b1 switch 0.0 (p1)b 1 endevent
event (p1)_c0 switch 0.4 (p1)c 0 endevent
event (p1)_c1 switch 0.4 (p1)c 1 endevent
event (p1)_d0 switch 0.4 (p1)d 0 endevent
event (p1)_d1 switch 0.4 (p1)d 1 endevent

// ustawianie ograniczenia predkosci
event (p1)_aV100 trackvel 0.0 (p1)a 100 endevent
event (p1)_aV40 trackvel 0.0 (p1)a 40.0 endevent
event (p1)_bV100 trackvel 0.0 (p1)b 100 endevent
event (p1)_bV40 trackvel 0.0 (p1)b 40.0 endevent

rotate 0 0 0
endorigin
 
