Virtual Train Depot Functions

Aus EEP Handbuch
Wechseln zu: Navigation, Suche
EEPGetTrainFromTrainyard() EEPGetTrainFromTrainyard(Depot,"TrainName",Num,Dir)
type: function
    EEPGetTrainFromTrainyard(1,"#Rheingold",1)

    EEPGetTrainFromTrainyard(2 ,"", 4 , 1) 
                
caller: script
defined in: EEP
parameters: four
returns: one
requires: EEP 11.3 plug-in 2, EEP 14.2 plug-In 2
purpose: Sends a specified train from the specified virtual train depot.
notes:
  • First argument is the ID of the train depot. You can find the ID in the header of the depot’s properties window.
  • Second argument is the entire train name as a string. If you enter an empty string as a train name, the train is specified by the third argument.
  • Third argument is the position in the depot list. The train name in the second argument takes precedence over this number and must be an empty string for this number to take effect. However, a number must always be given. Enter 0 if you use the train’s name.
  • New in EEP 14.2 plug-In 2: the fourt argument determines the driving direction:
    • Dir = 0 (or omitted fourth argument) Driving direction as ruled by the depot.
    • Dir = 1 Driving direction forewards
    • Dir = 2 Driving direction backwards
    • Dir = 3 Driving direction against the one ruled by the depot.
  • Return value is true if the targeted depot and train exist, regardless if the train is currently in the depot and available or not! It is false if either the depot doesn’t exist or the specified train is not listed in this depot.


EEPOnTrainExitTrainyard() EEPOnTrainExitTrainyard(Depot_ID,"TrainName")
type: function
    function EEPOnTrainExitTrainyard(Depot_ID,Zugname) 
        print(""TrainName.." has left depot "..Depot_ID"") 
    end 
                
caller: EEP
defined in: script
parameters: two
returns: none
requires: EEP 14 Plug-In 1
purpose: Called if a train leaves a virtual train depot.
notes:
  • The first argument gives the depot's ID.
  • The second argument is the name of the leaving train.


EEPGetTrainyardItemsCount() EEPGetTrainyardItemsCount(Depot)
type: function
    EEPGetTrainyardItemsCount(1)
                
caller: script
defined in: EEP
parameters: one
returns: one
requires: EEP 13.2 plug-in 2
purpose: Returns the number of consists currently listed in teh specified depot
notes:
  • Argument is the depot’s ID.
  • Return value is the number of consists listed in the depot.


EEPGetTrainyardItemName() EEPGetTrainyardItemName(Depot,List)
type: function
    EEPGetTrainyardItemName(1 , 2)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 13.2 plug-in 2
purpose: Returns the name of a consist at a specified location in a specified depot.
notes:
  • First argument is the depot’s ID.
  • Second argument is the position in the depot list.
  • Return value is the name of the consist at the specified position.


EEPGetTrainyardItemStatus() EEPGetTrainyardItemStatus(Depot,"Lua-Name",Liste)
type: function
    EEPGetTrainyardItemStatus(1 , "#FreightTrain" , 0)

    EEPGetTrainyardItemStatus(1 , "" , 3)
                
caller: script
defined in: EEP
parameters: three
returns: one
requires: EEP 13.2 plug-in 2
purpose: Returns the status of a specified train in a specified depot
notes:
  • First argument is the depot’s ID.
  • Second argument is the name of the consist. Enter an empty string if you want to specify the consist by it’s list number.
  • Third argument is the list position. This entry is ignored when a name is provided as a second argument. It is however mandatory and should be set to 0 if the name ist o be used.
  • Return value is the status of the specified consist:
    • true = waiting
    • false = running