Rolling Stock Functions

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

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche
EEPRollingstockSetCouplingFront() EEPRollingstockSetCouplingFront("Name",Coupler)
type: function
    EEPRollingstockSetCouplingFront("Castor1;001", 1)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.0
purpose: Activates or deactivates the front coupler of the specified rolling stock.
notes:
  • First argument is the entire name of the rolling stock as a string.
  • Second argument is the desired condition of the front coupler:
    • 1 = activate coupler (couples on contact when opposing coupler is also active)
    • 2 = deactivate coupler
  • Return value is true if the targeted rolling stock exists, else false


EEPRollingstockGetCouplingFront() EEPRollingstockGetCouplingFront("Name")
type: function
    hResult, hData = EEPRollingstockGetCouplingFront("Castor1;001")
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 11.0
purpose: Enquires the current condition of the front coupler of the specified rolling stock.
notes:
  • Argument is the entire name of the rolling stock as a string.
  • First return value is true if the targeted rolling stock exists, else false.
  • Second return value is the condition of the front coupler:
    • 1 = active
    • 2 = inactive
    • 3 = coupled


EEPRollingstockSetCouplingRear() EEPRollingstockSetCouplingRear("Name",Coupler)
type: function
    EEPRollingstockSetCouplingRear("fals 175 Kalk", 1)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.0
purpose: Activates or deactivates the rear coupler of the specified rolling stock.
notes:
  • First argument is the entire name of the rolling stock as a string.
  • Second argument is the desired condition of the rear coupler:
    • 1 = activate coupler (couples on contact when opposing coupler is also active)
    • 2 = deactivate coupler
  • Return value is true if the targeted rolling stock exists, else false


EEPRollingstockGetCouplingRear() EEPRollingstockGetCouplingRear("Name")
type: function
    Name = "fals 175 Kalk"
    hResult, hData = EEPRollingstockGetCouplingRear(Name)
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 11.0
purpose: Enquires the current condition of the rear coupler of the specified rolling stock.
notes:
  • Argument is the entire name of the rolling stock as a string.
  • First return value is true if the targeted rolling stock exists, else false.
  • Second return value is the condition of the rear coupler:
    • 1 = active
    • 2 = inactive
    • 3 = coupled


EEPRollingstockSetAxis() EEPRollingstockSetAxis("Name","Axis",Position)
type: function
    Name = "CoalPortalCrane"
    Axis = "Turn left"
    EEPRollingstockSetAxis(Name, Axis, 50)
                
caller: script
defined in: EEP
parameters: three
returns: one
requires: EEP 11.0
purpose: Moves the specified axis of the specified rolling stock to the desired position.
notes:
  • First argument is the entire name of the rolling stock as a string.
  • Second argument is the entire name of the axis as a string.
  • Third argument is the target position for the axis.
  • Return value is true if the targeted rolling stock and axis exist, else false.


EEPRollingstockGetAxis() EEPRollingstockGetAxis("Name","Axis")
type: function
    Name = "CoalPortalCrane 1"
    Axis = "Turn left"
    hResult, hData = EEPRollingstockGetAxis(Name, Axis)
                
caller: script
defined in: EEP
parameters: two
returns: two
requires: EEP 11.0
purpose: Enquires the current position of the specified axis of the specified rolling stock.
notes:
  • First argument is the entire name of the rolling stock as a string.
  • Second argument is the entire name of the axis as a string.
  • First return value is true if the targeted rolling stock and axis exist, else false
  • Second return value is the current position.


EEPRollingstockSetSlot() EEPRollingstockSetSlot("Name",Slot)
type: function
    EEPRollingstockSetSlot("PortalCrane2 Grabber", 1)
                
caller: script
defined in: EEP
parameters: tw
returns: one
requires: EEP 11.0
purpose: Moves all axiis of the specified rolling stock to the position saved in a slot.
notes:
  • First set all axiis to the wanted position and store this condition in one of 16 slots (context menu). Now you can use this Lua function to trigger an animation from the current setting of all axiis to the stored position.
  • First argument is the entire name of the rolling stock as a string.
  • Second argument is the number of the slot in which the wanted position was stored.
  • Return value is true if the targeted rolling stock and the slot exist, else false.
  • It is not verified that slot actually contains any settings.


EEPGetRollingstockItemsCount() EEPGetRollingstockItemsCount("Name")
type: function
    EEPGetRollingstockItemsCount("#FreightTrain")
                
caller: script
defined in: EEP
parameters: one
returns: one
requires: EEP 13.2 plug-in2
purpose: Returns the number of vehicles a specified train consists of
notes:
  • Argument is the complete name of a train consist as string.
  • Return value ist he sum of all rolling stock items in this train consist. No distinction is made between engine, tender, waggon or special items like separate bogeys.


EEPGetRollingstockItemName() EEPGetRollingstockItemName("Name",Number)
type: function
    EEPGetRollingstockItemName("#FreightTrain",3)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 13.2 plug-in2
purpose: Returns the name of a specified vehicle in a specified consist
notes:
  • First argument is the complete name of a train consist as string.
  • Second argument is the position number of one item. The count begins with 0.
  • Return value ist he name oft he specified vehicle.


EEPRollingstockGetTrainName() EEPRollingstockGetTrainName("Name")
type: function
    hResult, Name = EEPRollingstockGetTrainName("Castor 1" ) 
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 14.2 Plug-In 2
purpose: Enquires the name of the train the rolling stock is a member of.
notes:
  • The argument is the name of the rolling stock.
  • First return value is true, if the execution was successfull, otherwise false
  • Second return value is the name of the train.


EEPRollingstockGetLength() EEPRollingstockGetLength("Name")
type: function
    hResult, Laenge = EEPRollingstockGetLength("Container 0100") 
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 14.2 Plug-In 2
purpose: Gets the length of a vehicle.
notes:
  • The argument is the name of the vehicle.
  • First return value is true, if execution was successfull, false otherwise.
  • Second return value is the length of the consist from coupling to coupling in meters.


EEPRollingstockGetMotor() EEPRollingstockGetMotor("Name")
type: function
    hResult, Motor = EEPRollingstockGetMotor("DB_360_339") 
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 14.2 Plug-In 2
purpose: Enquires wether there is a motor to a vehicle.
notes:
  • The argument is the name of the vehicle.
  • First return value is true, if execution was successfull, false otherwise.
  • Second return value is true if the vehicle is motorized.


EEPRollingstockGetTrack() EEPRollingstockGetTrack("Name")
type: function
    hResult, ID, Position, Richtung, System = EEPRollingstockGetTrack( "BR 212 376-8"   ) 
                
caller: script
defined in: EEP
parameters: one
returns: five
requires: EEP 14.2 Plug-In 2
purpose: Enquires the current position of the vehicle on the track system.
notes:
  • The argument is the name of the vehicle.
  • 1. return value is true, if execution was successfull, false otherwise.
  • 2. return value is the id of the track, the vehicle sits on.
  • 3. return value is the distance (in meters) to the front end of the track.
  • 4. return value gives the orientation relative t the track (1 = parallel to the track, 0=anti parallel)
  • 5. return value is the ID of the track sysstem, the vehicle sits on:
    • 1 = railroad tracks
    • 2 = streets
    • 3 = subway and tram tracks
    • 4 = other


EEPRollingstockGetModelType() EEPRollingstockGetModelType("VehicleName")
type: function
    hResult , Typ = EEPRollingstockGetModelType( "Castor 1" ) 
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 14.2 Plug-In 2
purpose: Enquires the model category a rolling stock belongs to.
notes:
  • The argument is the name of the vehicle.
  • First return value is true, if execution was successfull, false otherwise.
  • Second return value is the category the creator of the model has assignet to it:
    • 1 = tank locomotive
    • 2 = tender locomotive
    • 3 = tender
    • 4 = electric locomotive
    • 5 = diesel locomotive
    • 6 = railcar
    • 7 = communter train
    • 8 = tram
    • 9 = freight waggons
    • 10 = person transport
    • 11 = aero vehicles
    • 12 = machines (e.g. cranes)
    • 13 = ships
    • 14 = trucks
    • 15 = cars