Need some help regarding 'Trigger once'

0 favourites
  • 4 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hey everybody!

    I'm still very new to Construct and I'm working on a small project to speed up the learning. I've been using 'Trigger once' multiple times now but in one case it simply doesn't work and I fail to see my fallacy.

    In the following two cases nothing changes except for the bottommost event block (under 'Is Start'). Why does the one with 'Trigger once' only work for the first sprite while the other one works for every sprite? Everything I've learned so far about the way picking instances works in construct suggests that both cases should have the same result.

    Case 1:

    Case 2:

  • from the Scirra manual

    Trigger once while true

    Turn an ordinary event (which is tested every tick) in to a trigger. For example, if an event plays a sound when lives equals 0, normally this event runs every tick. This plays about 60 sounds a second and would sound pretty bad. Adding Trigger once while true after the other conditions makes the event run just once when it first becomes true. This makes the previous example only play a sound once the first time your lives reaches 0. It must be the last condition in an event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've read that but I somehow thought it shold still work. Still a lot to learn about the way events work!

    I thought instance picking would limit this to the sprite which is affected by the event. So in this I case I thought the 'Trigger once' event would fire once per instance as long as the conditions are fullfilled. Guess I was wrong there, thank you!

  • The trigger once applies to the entire event.

    Once the conditions of the event are true, it will no longer run until the conditions are false again.

    In your first example, when the first instance rises above a certain point, the event becomes true and runs once. It never becomes false again.

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