System Variables

Aus EEP Handbuch
Version vom 7. September 2018, 11:52 Uhr von Marc Horstmann (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche
EEPVer EEPVer
type: variable
    if EEPVer < 11 then
        print( "Train control via Lua not possible!" )
    end
                
used in: script
source: EEP
requires: EEP 10.2 Plug-In 2
purpose: Detecting the version number of EEP.


EEPTime EEPTime
type: variable
    if EEPTime == alteZeit + 50 then
        print( "Exactly 50 seconds have passed" )
        alteZeit = EEPTime</div>
    elseif EEPTime > alte Zeit + 50 then
        print( "More than 50 seconds have passed" )
        alteZeit = EEPTime</div>
    else
        print( "50 seconds didn't expired yet" )
    end
                
used in: script
source: EEP
requires: EEP 10.2 Plug-In 2
purpose: EEPTime provides a variable that represents the current time within the EEP layout. The value equals the seconds passed since midnight (EEP time).


EEPTimeH EEPTimeH
Type: variable
    print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock")
                
used in: script
source: EEP
requires: EEP 10.2 Plug-In 2
purpose: Returns the hour component of EEPTime, expressed as a value between 0 and 23.


EEPTimeM EEPTimeM
Type: variable
    print("It is now: "..EEPTimeH..":"..EEPTimeM.." o'clock")
                
used in: script
source: EEP
requires: EEP 10.2 Plug-In 2
purpose: Returns the minute component of EEPTime, expressed as a value between 0 and 59.


EEPTimeS EEPTimeS
Type: variable
    if EEPTimeS == 15 then
        EEPSetSignal( 1 , 1 )   -- switch traffic light 1 to green
    elseif EEPTimeS == 45 then
        EEPSetSignal( 1 , 2 )   -- switch traffic light 1 to red
    end
                
used in: Script
source: EEP
requires: EEP 10.2 Plug-In 2
purpose: Returns the second component of EEPTime, expressed as a value between 0 and 59.