Train Functions: Unterschied zwischen den Versionen

Aus EEP Handbuch
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „ <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;"> <tr> <th colspan="2">EEPSetT…“)
 
Zeile 837: Zeile 837:
 
                     </li>
 
                     </li>
 
                     <li>The return value is true if the function was successfully executed.</li>
 
                     <li>The return value is true if the function was successfully executed.</li>
                </ul>
 
            </td>
 
        </tr>
 
    </table>
 
 
 
    <table width="90%" align="center" border="1" style="border: 1px solid black; border-collapse: collapse;">
 
        <tr>
 
            <th colspan="2">EEPOnTrainExitTrainyard()</th>
 
            <th style="padding: 10px;">EEPOnTrainExitTrainyard(Depot_ID,"TrainName")</th>
 
        </tr>
 
        <tr>
 
            <td scope="row">type: </td>
 
            <td style="padding: 10px;">function</td>
 
            <td rowspan="6" style="font: 15px Courier New, sans-serif; padding: 10px;">
 
                <pre>
 
    function EEPOnTrainExitTrainyard(Depot_ID,Zugname)
 
        print(""TrainName.." has left depot "..Depot_ID"")
 
    end
 
                </pre>
 
            </td>
 
        </tr>
 
        <tr>
 
            <td scope="row">caller: </td>
 
            <td style="padding: 10px;">EEP</td>
 
        </tr>
 
        <tr>
 
            <td scope="row">defined in: </td>
 
            <td style="padding: 10px;">script</td>
 
        </tr>
 
        <tr>
 
            <td scope="row">parameters: </td>
 
            <td style="padding: 10px;">two</td>
 
        </tr>
 
        <tr>
 
            <td scope="row">returns: </td>
 
            <td style="padding: 10px;">none</td>
 
        </tr>
 
        <tr>
 
            <td scope="row">requires: </td>
 
            <td style="padding: 10px;">EEP 14 Plug-In 1</td>
 
        </tr>
 
        <tr>
 
            <td scope="row">purpose: </td>
 
            <td colspan="2" style="padding: 10px;">Called if a train leaves a virtual train depot.</td>
 
        </tr>
 
        <tr>
 
            <td scope="row">notes: </td>
 
            <td colspan="2">
 
                <ul>
 
                    <li>The first argument gives the depot's ID.</li>
 
                    <li>The second argument is the name of the leaving train.</li>
 
 
                 </ul>
 
                 </ul>
 
             </td>
 
             </td>
 
         </tr>
 
         </tr>
 
     </table>
 
     </table>

Version vom 8. September 2018, 13:01 Uhr

EEPSetTrainSpeed() EEPSetTrainSpeed("#Name",TargetSpeed)
type: function
    EEPSetTrainSpeed("#Passenger train", 80)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.0
purpose: Assigns new target speed to the specified train.
notes:
  • First argument is the entire train name as a string.
  • Second argument is the desired speed. Use negative values for opposite direction.
  • A possible current signal influence is cancelled (i.e. a train currently stopped by a signal will move!).
  • Return value is true if the targeted train exists, else false.


EEPGetTrainSpeed() EEPGetTrainSpeed("#Name")
type: function
    hResult, hData = EPGetTrainSpeed("#VT98;001")
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 11.0
purpose: Enquires the current speed of the specified train.
notes:
  • Argument is the complete train name as a string.
  • First return value is true if the targeted train exists, else false.
  • Second return value is the train’s current speed.


EEPSetTrainRoute() EEPSetTrainRoute("#Name","Route")
type: function
    EEPSetTrainRoute("#Passenger train", "Route")
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Assigns a route to the specified train.
notes:
  • First argument is the entire train name as a string.
  • Second argument is the desired Route as a string.
  • Return value is true if the specified route and train exist, false if either one doesn’t exist.


EEPGetTrainRoute() EEPGetTrainRoute("#Name")
type: function
    hResult, hData = EEPGetTrainRoute("#Personenzug")
                
caller: script
defined in: EEP
parameters: one
returns: two
requires: EEP 11.2 Plug-in 2
purpose: Enquires the current route of the specified train.
notes:
  • Argument is the entire train name as a string.
  • First return value is true if the targeted train exists, else false.
  • Second return value is the train’s current route as a string.


EEPSetTrainLight() EEPSetTrainLight("#Name",true|false)
type: function
    EEPSetTrainLight("#Passenger train",true)

    EEPSetTrainLight( "#Ford_Transit", 1 , true ) 
                
caller: script
defined in: EEP
parameters: two or three
returns: one
requires:
               EEP 11.2 Plug-in 2,
               EEP 14.2 Plug-In 2
purpose: Switches the lights or the turn signals of the specified train on or off.
notes:
  • First argument is the entire train name as a string.
  • Second argument is the source of the light
    • 1 for the normal driving lights and the interior illumination.
    • 2 for the left turn signal.
    • 3 for the right turn signal.
  • Third argument is either true (i.e. lights on) or false (i.e. lights off).
  • Return value is true if the targeted train exists, else false.


EEPSetTrainSmoke() EEPSetTrainSmoke("#Name",true|false)
type: function
    EEPSetTrainSmoke("#Passenger train",true)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Turns the smoke and steam of the specified train on or off.
notes:
  • First argument is the entire train name as a string.
  • Second argument is either true (i.e. smoke on) or false (i.e. smoke off).
  • Return value is true if the targeted train exists, else false.


EEPSetTrainHorn() EEPSetTrainHorn("#Name",true|false)
type: function
    EEPSetTrainHorn("#Passenger train",true)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Turns the warning sound of the specified train on or off.
notes:
  • First argument is the entire train name as a string.
  • Second argument is true to sound the horn, whistle etc. and false to mute it.
  • Return value is true if the targeted train exists, else false.


EEPTrainLooseCoupling() EEPTrainLooseCoupling("#Name",true|false,Position,"#Name")
type: function
    EEPTrainLooseCoupling("#FreightTrain", true, 3, "#Waggons") 
                
caller: script
defined in: EEP
parameters: three
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Separates a train consist after the specified number of vehicles.
notes:
  • First argument is the entire train name as a string.
  • Second argument defines if you count vehicles from the front or the rear.
  • Third argument defines the position at which the train is split.
  • An optional fourth argument provides the new train name for the detached train section.
  • Return value is true if the targeted train and the specified position exist, else false.


EEPSetTrainCouplingFront() EEPSetTrainCouplingFront("#Name",true|false)
type: function
    EEPSetTrainCouplingFront("#Freight train", true)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Activates or deactivates the front coupler of a train consist.
notes:
  • First argument is the entire train name as a string.
  • Second argument is true (i.e. couple on contact) or false (i.e. don’t couple).
  • Return value is true if the targeted train exists, else false.


EEPSetTrainCouplingRear() EEPSetTrainCouplingRear("#Name",true|false)
type: function
    EEPSetTrainCouplingRear("#Freight train", true)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Activates or deactivates the rear coupler of a train consist.
notes:
  • First argument is the entire train name as a string.
  • Second argument is true (i.e. couple on contact) or false (i.e. don’t couple).
  • Return value is true if the targeted train exists, else false.


EEPOnTrainCoupling() EEPOnTrainCoupling("Train_A","Train_B","Train_new")
type: function
    function EEPOnTrainCoupling(Train_A, Train_B, Train_new) 
        print( ""Train_A.." and "..Train_B.." became "..Train_new"") 
    end 
                
caller: EEP
defined in: script
parameters: three
returns: none
requires: EEP 14 Plug-In 1
purpose: Called if two trains are coupled.
notes:
  • Argument 1 is the name of the train that was faster moving and therefore was the source of the ID for the resulting train.
  • Argument 2 is the name of the slower moving train, whiches ID therefore was lost.
  • Argument 3 is the name of the new train.


EEPOnTrainLooseCoupling() EEPOnTrainLooseCoupling("Train_A","Train_B","Train_old")
type: function
    function EEPOnTrainLooseCoupling(Train_A, Train_B, Train_old) 
        print( ""Train_old.." divided in "..Train_A.." und "..Train_B"") 
    end 
                
caller: EEP
defined in: script
parameters: three
returns: none
requires: EEP 14 Plug-In 1
purpose: Called if a train gets split.
notes:
  • Argument 1 is the name of the resulting train, whiches coupling was deactivated. This part inherits the ID of the original train.
  • Argument 2 is the name of the uncoupled part of the train. It gets assigned a new ID.
  • Argument 3 is the name of the original train.


EEPSetTrainHook() EEPSetTrainHook("#Name",true|false)
type: function
    EEPSetTrainHook("#Rail Crane", true)
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Activates or deactivates the hook of the specified train for lifting goods.
notes:
  • First argument is the entire train name as a string.
  • Second argument is true (i.e. hook) or false (i.e unhook).
  • Return value is true if the targeted train exists, else false.


EEPSetTrainAxis() EEPSetTrainAxis("#Name","Axis",Position)
type: function
    EEPSetTrainAxis("#Rail Crane", "Turn To The Left”, 100)
                
caller: script
defined in: EEP
parameters: three
returns: one
requires: EEP 11.2 Plug-in 2
purpose: Animates the specified axis of the specified train.
notes:
  • First argument is the entire train name as a string.
  • Second argument is the name of the axis as a string.
  • Third argument is the target position of the axis.
  • Return value is true if the targeted train and the axis exist, else false.


EEPSetTrainName() EEPSetTrainName("OldTrainName","NewTrainName")
type: function
    hResult = EEPSetTrainName("#RE 1","#RE 5") 
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 14 Plug-In 1
purpose: Assignes a name to a train.
notes:
  • The first argument is the actual name of the train.
  • The second argument is the new name of the train.
  • Returns true if the train was successfully renamed.


EEPSetTrainHookGlue() EEPSetTrainHookGlue("TrainName",true|false)
type: function
    EEPSetTrainHookGlue("#CraneTrain",true) 
                
caller: script
defined in: EEP
parameters: two
returns: one
requires: EEP 14.2 Plug-In 2
purpose: Influences the behaviour of hooked goods.
notes:
  • The first argument is the name of the train.
  • The second argument defines the behaviour:
    • false = Goods are swinging (appropriate for hooks)
    • true = Goods are fixed (appropriate for grabbers)
  • The return value is true if the function was successfully executed.