Trigger once doesn't work with comparing two values

0 favourites
  • 3 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hi all.

    In my case I want if one number is higher than the other, the action will be sprite(object) will run Fade In.

    But fade in happens every time(while true), when number still goes higher.

    I need to Fade In happen once while true.

    So I added System-Trigger Once and still it triggers every time while true, not once.

    How do I make the fade in effect happen once, when event comparing two number is true?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Solved.

    For anyone else experiencing this, the solution is:

    1.Create a new Boolean variable, such as "IsConditionMet", and set its initial value to False.

    2.Create a new event in your event sheet that compares the two numbers and adds a "Trigger once" condition.

    3.Add an additional condition to check whether the "IsConditionMet" variable is False. This will ensure that the actions in the event only occur once when the condition is first met.

    4.In the action section of the event, set the "IsConditionMet" variable to True, and add the actions to start the fade in effect.

    Cheers! Happy game making everyone, who's browsing this!

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