//Rozjazd z napêdem mechanicznym 
//Autor: ISDR
//Zdjêcia: Irek Krzak

//sterowanie zwrotnica za pomoca klawiszy t,T
node -1 0 (p1) eventlauncher (p2) (p3) (p4) 5.0 t 0 (p1)+ (p1)- end 

//---przelaczanie zwrotnicy o nazwie (p1)
event (p1)_0 switch 0.0 (p1) 0 endevent
event (p1)_1 switch 0.0 (p1) 1 endevent

//---ustawianie ograniczenia predkosci 
event (p1)_Vmax trackvel 0.0 (p1) -1 endevent
event (p1)_V40 trackvel 0.0 (p1) 40.0 endevent

event (p1)_suwak0 animation 0.0 (p1)_naped translate suwak 0 0 0 0.05 endevent
event (p1)_suwak1 animation 0.0 (p1)_naped translate suwak -0.1 0 0 0.05 endevent

event (p1)_latarnia0 animation 0.0 (p1)_naped rotate latarnia 0 0 0 50 endevent
event (p1)_latarnia1 animation 0.0 (p1)_naped rotate latarnia 0 0 90 50 endevent

event (p1)_walek0 animation 0.0 (p1)_naped rotate walek 0 0 0 30 endevent
event (p1)_walek1 animation 0.0 (p1)_naped rotate walek 0 54 0 30 endevent

//-- procedury sterujace:
event (p1)+ multiple 0 none (p1)_0 (p1)_Vmax (p1)_suwak0 (p1)_latarnia0 (p1)_walek0 endevent
event (p1)- multiple 0 none (p1)_1 (p1)_V40 (p1)_suwak1 (p1)_latarnia1 (p1)_walek1 endevent


origin (p2) (p3) (p4)
rotate 0 (p5) 0

//model napêdu mechanicznego
node 400 0 (p1)_naped model 1.8 0.2 0.1 180 pkp/wz_l1.t3d none endmodel


rotate 0 0 0
endorigin
