Instance variable trigger once

0 favourites
  • 2 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hey everyone, I'm stumped by something that's got an insanely easy answer, I just can't seem to find anyone answering it.

    Basically I have four boxes, when you click each one you add 1 to an instance variable, meaning you need to click all four to get to the next event. However, if you click the same box four times, it gets the same result, how do I make it so that a box will only add 1 and after that will not contribute any more to the instance variable? Thought the trigger once while true would help but I guess not.

    Sorry for such an amateur question

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would give each box a Boolean, if it is false, when clicked, add 1 to the variable you're talking about and set the Boolean to true. If it is true, then subtract 1 from the variable (assuming it is not 0) and set the Boolean to false.

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