0 Favourites

Adding only Value 1 after CheckBox check

This forum is currently in read-only mode.
  • Hi,

    i have no idea if this is supposed to be like this, but i have 3 checkboxes and i want if all 3 are checked let a message appear for example. My idea was simply to button1 is checked add 1 to global variable "counter"

    and then if "counter" equal 3 BING MESSAGE appears. But the message appears if only 1 checkbox is checked after some time. I tested for example setting "counter" equal to 100 as a condition. The same thing, after some time, the message appears. This is because

    button1 is checked add 1 to global variable "counter"

    adds value 1 to the variable all the time and not just one time as i wish it would? Any ideas about how to fix this? Is this a bug or is it supposed to be like this? I tested it with displaying the variable in a text field and i was growing and growing....

    Thanks for your time and help,

    unknown1111

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • adds value 1 to the variable all the time and not just one time as i wish it would?

    The 'Is checkbox checked' condition will be always true if any instance of the button is checked as long as you don't use other actions to pick instances accordingly. So it will always add to the variable. This is NOT a bug.

    To do an action for all instances of an object equally, it sometimes requires a For each loop. Take a look at the following cap, which (hopefully) works like you want:

    http://dl.dropbox.com/u/2306601/buttoncheck.cap

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