Jump to content

georgeb

Mitglieder
  • Gesamte Inhalte

    56
  • Benutzer seit

  • Letzter Besuch

Beiträge erstellt von georgeb

  1. I have two items for a little help please...

    1) Can I add, say, 1 minute to the current time and use this result to make an event trigger at that time.   Complicated?  Train released from Depot.  Arrives at Signal at 14:27.  Need to notify user a train will arrive at 14:30.  Then release train into system at 14:30.

    2) Can I display the system timers on a "TEXT" panel ?

     

    Thanks in advance

     

    George

     

  2. 22 hours ago, simonjackson1964 said:

    You are welcome.

    When Goetz first told me what they are and how to use them, I thought, "Meh, can't see them being much use", but now I use them all over the place, to dictate which events run in which circumstances. You can use a single track contact and have a whole raft of keywords on it, that all trigger different events. The important thing is to make sure the events don't conflict with each other!

    I also use lists and iterations. A track contact at the start of two or more different routes will have a keyword something like "Junction" or "Choose Route", and a list of all the available routes. A locomotive will also have a list of the routes it needs to choose. The event activated by the loco triggering the track contact with that keyword will iterate the available routes and within that iterate the loco's choices, and set the route when it finds a match. If it doesn't find a match it doesn't set a route and the train is stopped at the next signal!

    (It's possible to reverse the nesting of the iterations, but it really makes little difference).

    Anyway, have fun!

    Simon

     

    Is there anywhere (in English) with examples that I can understand lists and choice from a list?

  3. 8 hours ago, Goetz said:

    Hello Jud91,

    the name of the train is one of its properties.
    And the train, which initiated the event, is one of two triggers (the other being the contact)

    1376030095_conditiontrainname.jpg.5d7a65c7d37803b5dc128d4427677395.jpg

    Please click on a small cog wheel icon to change from variable to property, to select a trigger or to change the type to text field 

    Kind regards
    Goetz

    I have managed to find the code on the internet:-

    Train Name = "Down Fast London for P2".

     

    It set the absolute speed to 20 for this train and to 10 for all others

    if  string.find(vehicle.name,"London")  then
      layout:enumVehicles(
        function (vehicle)
          if vehicle:hasEngine() then
            vehicle.engine.active = true
            vehicle.targetSpeedAbs = 20
          end
        end
      )
    else
      layout:enumVehicles(
        function (vehicle)
          if vehicle:hasEngine() then
            vehicle.engine.active = true
            vehicle.targetSpeedAbs = 10
          end
        end
      )
    end

     

    Thank you Goetz for your help in getting me there.

     

    George

     

×
×
  • Neu erstellen...