(SOLVED) Temporary Events Don't Trigger Permanent Actions?

0 favourites
  • 4 posts
From the Asset Store
Game Triggers
$44.50 USD
50% off
Game Triggers is as versatile as a Swiss army knife, and will be a great resource for any type of game you're creating.
  • I have an event that fires only when a variable is less than another variable.

    That event triggers an action that changes another variable.

    When the event stops firing, the variable it was affecting reverts back.

    I want the variable to stay permanently when it's changed.

    Do you know what I'm doing wrong?

    I noticed events that don't have the green arrow(a physical trigger, not a check every tick) do this.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you have an event that's like "var1 > var2", this event will keep happen every tick when var1 > var2.

    The green arrow means that the event is a trigger, so it indeed does trigger only once, but you if you have one in a sub-event like this:

    var1 is less than var2

    |- trigger event

    Since var1 is less than var2, the trigger will keep occurring every tick also.

    If you want to check if var2 is less than var1 and then only trigger it once, you have to use the system event "trigger once while true". So it would look like this:

    var1 is less than var2

    trigger only once - do action

  • If you have an event that's like "var1 > var2", this event will keep happen every tick when var1 > var2.

    The green arrow means that the event is a trigger, so it indeed does trigger only once, but you if you have one in a sub-event like this:

    var1 is less than var2

    |- trigger event

    Since var1 is less than var2, the trigger will keep occurring every tick also.

    If you want to check if var2 is less than var1 and then only trigger it once, you have to use the system event "trigger once while true". So it would look like this:

    var1 is less than var2

    trigger only once - do action

    Thank you all problems fixed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)