//w scenerii nalezy koniecznie dodac taki trainset:

//trainset none startzegarynka 30.0 60
//node -1 0 SM42 dynamic PKP\SM42 sm42-643 sm42ddumb 0.0 headdriver 0 0 enddynamic
//endtrainset

// i ponizszy wpis:
//                  origin 0 -1000 0
//                  include lj/zegar.scn end
//                  endorigin

// kolejnosc zmiany stanu komurki zegarynka_mem ;
// jeden 1 1,jeden 1 2 ,jeden 1 3,jeden 1 4 ,... jeden 1 7,jeden 2 8 ,jeden 2 1 ,jeden 2 2,jeden 2 3 ,jeden 2 4 


node -1 0 none track normal 0.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
1153.51 0.2 82.5049  0.0  //point 1
7.88538 0.0 27.0986  //control vector 1
0.0 0.0 -28.2227  //control vector 2
1165.46 0.2 166.324  0.0  //point 2
0 
velocity 62.0 
endtrack

node -1 0 startzegarynka track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
1148.95 0.2 264.482  0.0  //point 1
-10.9318 0.0 31.5714  //control vector 1
20.6599 0.0 -26.2567  //control vector 2
1101.23 0.2 351.835  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 100.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
1101.23 0.2 351.835  0.0  //point 1
-20.6599 0.0 26.2568  //control vector 1
28.1138 0.0 -18.0518  //control vector 2
1027.55 0.2 418.765  0.0  //point 2
-300.0 
event2 zegarynkago 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
1027.55 0.2 418.766  0.0  //point 1
-28.1138 0.0 18.0518  //control vector 1
32.4728 0.0 -7.85947  //control vector 2
936.032 0.2 457.906  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
936.032 0.2 457.907  0.0  //point 1
-32.4728 0.0 7.85938  //control vector 1
33.2569 0.0 3.19815  //control vector 2
836.744 0.2 464.948  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 100.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
836.744 0.2 464.948  0.0  //point 1
-33.257 0.0 -3.19824  //control vector 1
30.3799 0.0 13.9037  //control vector 2
740.617 0.2 439.114  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
740.617 0.2 439.114  0.0  //point 1
-30.3801 0.0 -13.9034  //control vector 1
24.1587 0.0 23.0783  //control vector 2
658.233 0.2 383.252  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 100.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
605.871 0.2 15.9436  0.0  //point 1
16.7478 0.0 -28.9096  //control vector 1
-25.285 0.0 21.8385  //control vector 2
669.364 0.2 -60.7142  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 50.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
658.233 0.2 383.252  0.0  //point 1
-12.0794 0.0 -11.5391  //control vector 1
9.96326 0.0 13.337  //control vector 2
625.117 0.2 345.868  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 50.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
709.747 0.2 -90.0984  0.0  //point 1
14.2297 0.0 -8.64053  //control vector 1
-15.5194 0.0 6.18146  //control vector 2
754.445 0.2 -112.377  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 100.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
1110.23 0.2 -7.1306  0.0  //point 1
19.3175 0.0 27.2596  //control vector 1
-9.33496 0.0 -32.0797  //control vector 2
1153.51 0.2 82.5047  0.0  //point 2
-300.0 
event2 zegarynkaevent 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
1165.46 0.2 166.324  0.0  //point 1
0.0 0.0 33.4104  //control vector 1
10.9318 0.0 -31.5714  //control vector 2
1148.95 0.2 264.483  0.0  //point 2
-300.0 
event2 zegarynka 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
950.557 0.2 -121.35  0.0  //point 1
32.038 0.0 9.47751  //control vector 1
-27.1735 0.0 -19.4385  //control vector 2
1040.0 0.2 -77.6713  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 100.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
851.746 0.2 -133.359  0.0  //point 1
33.3754 0.0 -1.52734  //control vector 1
-32.0381 0.0 -9.47699  //control vector 2
950.557 0.2 -121.351  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 50.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
669.364 0.2 -60.7139  0.0  //point 1
12.6426 0.0 -10.9191  //control vector 1
-14.2297 0.0 8.64052  //control vector 2
709.747 0.2 -90.0984  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
754.445 0.2 -112.377  0.0  //point 1
31.0387 0.0 -12.3632  //control vector 1
-33.3754 0.0 1.52701  //control vector 2
851.746 0.2 -133.359  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
1040.0 0.2 -77.6712  0.0  //point 1
27.1735 0.0 19.4385  //control vector 1
-19.3176 0.0 -27.2596  //control vector 2
1110.23 0.2 -7.1313  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
598.662 0.2 303.509  0.0  //point 1
-15.2778 0.0 -29.7126  //control vector 1
4.71509 0.0 33.076  //control vector 2
568.461 0.2 208.663  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 50.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
625.117 0.2 345.868  0.0  //point 1
-9.96326 0.0 -13.337  //control vector 1
7.63898 0.0 14.8563  //control vector 2
598.662 0.2 303.509  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 99.9999 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
570.956 0.2 109.156  0.0  //point 1
6.36658 0.0 -32.7981  //control vector 1
-16.7476 0.0 28.9097  //control vector 2
605.871 0.2 15.9431  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 50.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
565.553 0.2 158.806  0.0  //point 1
0.417297 0.0 -16.6424  //control vector 1
-3.18335 0.0 16.399  //control vector 2
570.956 0.2 109.156  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

node -1 0 none track normal 50.0 1.435 0.25 25.0 20 0 Flat vis 
 Rail_screw_used1 4 TpBpS-new2.tex 0.2 0.5 1.1 
568.461 0.2 208.663  0.0  //point 1
-2.35754 0.0 -16.538  //control vector 1
-0.417297 0.0 16.6423  //control vector 2
565.553 0.2 158.806  0.0  //point 2
-300.0 
velocity 62.0 
endtrack

//-------------------zegar--------------------\\

node -1 0 zapadka_mem memcell -75 0 -100 jeden 0 0 none endmemcell
node -1 0 zegarynka_mem memcell -75 0 -100 jeden 1 1 none endmemcell

event zegarynkago putvalues 1.0 none 0 0 0 SetVelocity 62.0 62.0 endevent

//!!!!!!!!!!!!!!!!!!!!ponizej kluczowe event w zegarze;poszczegolne eventy uzalezniamy od wartosci komurki zegarynka_mem!! 
event zegarynkaevent multiple 1.0 none event1 event2 event3 event4 event5 event6 event7 event8 endevent 
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
event zapadka30 updatevalues 3 zapadka_mem * * 0 endevent
event zapadka31 updatevalues 1.0 zapadka_mem * * 1 endevent

event zapadka20 updatevalues 1.0 zapadka_mem * 0 * endevent
event zapadka21 updatevalues 1.0 zapadka_mem * 1 * endevent


event wpisz-18 updatevalues 0.0 zegarynka_mem osiem * * endevent
event wpisz18 multiple 1.0 zegarynka_mem wpisz-18 zapadka20 condition memcompare siedem 8 8 endevent 

event wpisz-17 updatevalues 0.0 zegarynka_mem siedem * * endevent
event wpisz17 multiple 3.0 zegarynka_mem wpisz-17 zapadka20 condition memcompare szesc 8 8 endevent 

event wpisz-16 updatevalues 0.0 zegarynka_mem szesc * * endevent
event wpisz16 multiple 5.0 zegarynka_mem wpisz-16 zapadka20 condition memcompare piec 8 8 endevent 

event wpisz-15 updatevalues 0.0 zegarynka_mem piec * * endevent
event wpisz15 multiple 7.0 zegarynka_mem wpisz-15 zapadka20 condition memcompare cztery 8 8 endevent 

event wpisz-14 updatevalues 0.0 zegarynka_mem cztery * * endevent
event wpisz14 multiple 9.0 zegarynka_mem wpisz-14 zapadka20 condition memcompare trzy 8 8 endevent 

event wpisz-13 updatevalues 0.0 zegarynka_mem trzy * * endevent
event wpisz13 multiple 11.0 zegarynka_mem wpisz-13 zapadka20 condition memcompare dwa 8 8 endevent 

event wpisz-12 updatevalues 0.0 zegarynka_mem dwa * * endevent
event wpisz12 multiple 14.0 zegarynka_mem wpisz-12 zapadka20 condition memcompare jeden 8 8 endevent 

event wpisz-11 updatevalues 0.0 zegarynka_mem jeden * * endevent
event wpisz11 multiple 17.0 zegarynka_mem wpisz-11 zapadka20 condition memcompare zero 8 8 endevent 




event wpisz_28 updatevalues 0.0 zegarynka_mem * 8 * endevent

event wpisz28 multiple 1.0 zegarynka_mem wpisz_28 zapadka21 zapadka30 condition memcompare * 7 8 endevent 

event wpisz_27 updatevalues 0.0 zegarynka_mem * 7 * endevent
 
event wpisz27 multiple 3.0 zegarynka_mem wpisz_27 zapadka30 condition memcompare * 6 8 endevent 

event wpisz_26 updatevalues 0.0 zegarynka_mem * 6 * endevent

event wpisz26 multiple 5.0 zegarynka_mem wpisz_26 zapadka30 condition memcompare * 5 8 endevent 

event wpisz_25 updatevalues 0.0 zegarynka_mem * 5 * endevent

event wpisz25 multiple 8.0 zegarynka_mem wpisz_25 zapadka30  condition memcompare * 4 8 endevent 

event wpisz_24 updatevalues 0.0 zegarynka_mem * 4 * endevent

event wpisz24 multiple 11.0 zegarynka_mem wpisz_24 zapadka30 condition memcompare * 3 8 endevent 

event wpisz_23 updatevalues 0.0 zegarynka_mem * 3 * endevent

event wpisz23 multiple 13.0 zegarynka_mem wpisz_23 zapadka30 condition memcompare * 2 8 endevent 

event wpisz_22 updatevalues 0.0 zegarynka_mem * 2 * endevent

event wpisz22 multiple 15.0 zegarynka_mem wpisz_22 zapadka30 condition memcompare * 1 8 endevent 

event wpisz-21 updatevalues 0.0 zegarynka_mem * 1 * endevent
event wpisz_21 multiple 0.0 zapadka_mem wpisz-21 zapadka30 condition memcompare * 0 * endevent 
event wpisz21 multiple 17.0 zegarynka_mem wpisz_21 condition memcompare * 8 1 endevent 




event wpisz-38 updatevalues 0.0 zegarynka_mem * * 8 endevent
event wpisz38 multiple 1.0 zegarynka_mem wpisz-38 zapadka31 condition memcompare * * 7 endevent 

event wpisz-37 updatevalues 0.0 zegarynka_mem * * 7 endevent
event wpisz37 multiple 3.0 zegarynka_mem wpisz-37 condition memcompare * * 6 endevent 

event wpisz-36 updatevalues 0.0 zegarynka_mem * * 6 endevent
event wpisz36 multiple 5.0 zegarynka_mem wpisz-36 condition memcompare * * 5 endevent 

event wpisz-35 updatevalues 0.0 zegarynka_mem * * 5 endevent
event wpisz35 multiple 6.0 zegarynka_mem wpisz-35 condition memcompare * * 4 endevent 

event wpisz-34 updatevalues 0.0 zegarynka_mem * * 4 endevent
event wpisz34 multiple 7.0 zegarynka_mem wpisz-34 condition memcompare * * 3 endevent 

event wpisz-33 updatevalues 0.0 zegarynka_mem * * 3 endevent
event wpisz33 multiple 8.0 zegarynka_mem wpisz-33 condition memcompare * * 2 endevent 

event wpisz-32 updatevalues 0.0 zegarynka_mem * * 2 endevent
event wpisz32 multiple 9.0 zegarynka_mem wpisz-32 condition memcompare * * 1 endevent 

event wpisz-31 updatevalues 0.0 zegarynka_mem * * 1 endevent
event wpisz_31 multiple 0.0 zapadka_mem wpisz-31 condition memcompare * * 0 endevent 
event wpisz31 multiple 10.0 zegarynka_mem wpisz_31 condition memcompare * * 8 endevent 

event wpisz1 multiple 35.0 none wpisz11 wpisz12 wpisz13 wpisz14 wpisz15 wpisz16 wpisz17 wpisz18 endevent

event wpisz2 multiple 15 none wpisz21 wpisz22 wpisz23 wpisz24 wpisz25 wpisz26 wpisz27 wpisz28 endevent

event wpisz3 multiple 1 none wpisz31 wpisz32 wpisz33 wpisz34 wpisz35 wpisz36 wpisz37 wpisz38 endevent

event zegarynka multiple 0.0 none wpisz1 wpisz2 wpisz3 endevent

//--------------koniec zegara---------------------\\



