Jump to content

Conditions in an Event


Empfohlene Beiträge

Hello,

Am I right when I say that the "Action if not met" refers only to the conditions of the Event and NOT to the evaluation for the triggering of the Event?

Example : Variable A = 9

Train enters a track - vehicule : any - track : track1
Conditions : none
Action when met : set variable A = 1
Action when not met : set variable A = 0

             In the event above, the variable A will never be 0 because the Event will only be triggered when the train effectively enters the track track1.  Is this correct?

Train enters a track - vehicule : any - track : $_Trigger2._Name
Conditions : none
Action when met : set variable A = 1
Action when not met : set variable A = +1

           What will be the value for the variable A?

Train enters a track - vehicule : any - track : $_Trigger2._Name
Conditions : Loco is residing on track track1
Action when met : set variable A = 1
Action when not met : set variable A = +1

           What will be the value for the variable A?

and finally

Train enters a track - vehicule : any - track : Empty
Conditions : none
Action when met : set variable A = 1
Action when not met : set variable A = +1

           What will be the value for the variable A?

 

Thank you in advance

André

Link zu diesem Kommentar
Auf anderen Seiten teilen

Hello André,

"Action when not met" will be only evaluated if you have explicitly specified at least one condition. With "Conditions: none" the "Action(s) when not met" will be never executed.

Following this rule, your questions 1, 2 and 4 will all result in A = 1.

Within question 3, the condition has to be understood as "Any arbitrary vehicle is residing on track track1".
When the train enters any track (needs not to be track1), the condition is true, if any vehicle (needs not to be part of the considered train) resides on track1.

Then, A = 1.
If the condition is not true, A = 10 (because it was previously 9).

The fact, that the train enters a track, will not be understood as a condition! This is an event!

Many greetings
BahnLand
 

Link zu diesem Kommentar
Auf anderen Seiten teilen

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen.

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...