"Train Waiting" - How Does It Work?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OmenRotcod
    Senior Member
    • Apr 2022
    • 153
    • Calgary, Alberta, Canada
    • MSOR

    #1

    "Train Waiting" - How Does It Work?

    I have been trying to get a waiting train to move on after an event triggered by the player train (i.e., when it reaches a certain location). Reference the Manual, Section 10.16.10 AI train Waiting Point modification through event.

    However, I have had no success. I can get 1) the AI train to start off and wait at its waiting point and 2) the player train to trigger a location event when it reaches it. But the AI train does not continue until its original waiting time has expired.

    The waiting point and duration I set in TrackViewer, the Player train location trigger I code manually.

    My main sticking point might be about the meaning of the term "ORTSMatchingWPDelay". The Manual states: "3) ORTSMatchingWPDelay indicates the original value of the AI train waiting point; this is used to ensure that the correct waiting point is modified."

    What exactly is the "original value of the AI train waiting point" and where is it to be found or how derived? Does it mean "the time that the train was set to reach the waiting point" or does it mean "the number of seconds the train was originally set to wait (the wait time)"?

    For example: if the starting time of the AI train is 32400 seconds and the train waiting time is 602 seconds, should the value be 33002 or should it be 602? I have tried both, but no success. What other value could it be?

    David

    P.S. This is the relevant code I have (the train waiting to re-start is named "BYR-SYC-F-T05". It starts at 9am and its original waiting time is 10 minutes and 2 seconds).

    in main Activity file (this is the event triggered by the player train reaching the specified location):-


    EventTypeLocation ( )
    ID ( 1 )
    Activation_Level ( 1 )
    Outcomes (
    DisplayMessage ( "The waiting train, T05, should continue in 5 seconds." )
    )
    ORTSContinue ( 3 )
    Name ( StartWaitingTrainT05 )
    Location ( -11605 14436 465.976 -596.019 10 )
    )


    ​
    in Activity Extension file:-

    SIMISA@@@@@@@@@@JINX0a0t______

    Tr_Activity (
    ...Tr_Activity_File (
    ......Events (
    .........EventCategoryLocation (
    ............ID ( 2 )
    ...............Activation_Level ( 1 )
    ...............ORTSContinue ( 3 )
    ..................Outcomes (
    ..................ORTSRestartWaitingTrain (
    ..................ORTSWaitingTrainToRestart ( "BYR-SYC-F-T05" )
    ..................ORTSDelayToRestart ( 5 )
    ..................ORTSMatchingWPDelay ( 33002 )
    ..................)
    ...............)
    ............Name ( TrainT05WaitsToRestart )
    .........)
    ......)
    ...)
    )


    ​


    ​
  • cntrainguy12
    Member

    • Jan 2013
    • 43
    • Southern Ontario
    • ORTS

    #2
    Hi. I was testing this feature out today as it is something that I am planning to use for my own activity building. The line:

    ORTSMatchingWPDelay ( 33002 )​

    refers to the value of the waiting point as found in the OpenRails advanced shunting options in the OpenRails path editor. The 3 refers to the fact that the waiting point is to a specific time of day, and the following digits refer to the hour and minute. 3HHMM. As an example:

    Screenshot 2024-12-12 221255.png
    Here we have a train that will be otherwise waiting at this point until 23:59 until triggered to start moving. In my line for the event outcome, I would then put:

    ORTSMatchingWPDelay ( 32359 )​​

    Hope this helps!
    Last edited by cntrainguy12; 12-12-2024, 21:49.

    Comment

    Working...