How do I "Trigger once while true" individually

  • Ok, simple question. There is a Object, lets call it "Box", and I have some instances of this object.

    When a boolean variable of the box change, I need there something happen with the box that have his variable changed.

    I tryed

    "|For each box            |

    |Box Variable is true    | ------   Box Y set to 1000

    |Trigger once while true |"

    dont work, trigger once for the first instance and repeat infinite times for other objects.

    "|Box Variable is true    | ------   Box Y set to 1000

    |Trigger once while true |

    dont work too, same effect above.

    I had heard that the order of the conditions changes its effect, but I had tested for a long while and nothing happens. Tnx and sorry my english.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • scirra.com/forum/trigger-once-and-instances_topic86899.html

    Trigger once is a system command and it doesn't pick instances

  • I would go with Functions to solve this.

    There is a place (or multiple places) in your events where you set this boolean to true. Instead of doing that, you should call a function that would set the boolean to true and then do your actions.

    Example :capx

  • Actually I solve this problem with many ways, but I was curious about why "Trigger Once While True" was not working. Tnx Roccinio, forget about System Cond doesn't pick instances and Yes Guizmus, function solve all problems. Tnx all.

  • The correct way to use "trigger once while true" is to put it as a sub-event

    (Sorry for being late of 16 months to reply ahahah)

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