[SOLVED] Disable all Groups at the same time

This forum is currently in read-only mode.
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hi guys,

    I'm not sure if it's really possible, but it would be great:

    In fact, I would like to disable all the groups I created with only one "Set group Enable" or "Toggle group Enabled" action.

    Is it possible?

    The reason why I'm asking you this is that I have some buttons like "Yes", "No", that do different actions, because I didn't want to create fifty objects for each events.

    Of course if you have other solution to make an action listen to only one selected group, I'll be taker!

    Thanks in advance.

    Regards.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sadly not all at once, however you can instead use a global variable eg: ActiveGroup

    and then in each group create an event "System object > compare global variable > "ActiveGroup" = 1" or similar, then throw the events underneath.

    This means you just change your variable and whichever group has that number will be active <img src="smileys/smiley1.gif" border="0" align="middle" />

    Edit: Also, you might like the examples kit I made for Construct Classic which has a lot of source codes to games and examples I've made. You can grab it from the link in my signature here <img src="smileys/smiley1.gif" border="0" align="middle" /> (it also has a link to the newest version of Construct Classic, Version R2 on Source Forge)

  • Hmmm....

    Not sure about how to introduce your technique :/

    Could you make a screenshot for me?

    Or an example cap?

    Thanks.

  • Wait, no, I found another trick, similar to yours:

    actually I put a private variable, like "Condition=0", and then active actions (not groups) set the private variable to 1 (actually it acts like they're opening doors), and then the other actions follows, and when all is done, the private var. is set back to 0.

    Thank you very much anyway <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Sure, here's a cap <img src="smileys/smiley1.gif" border="0" align="middle">: https://dl.dropboxusercontent.com/u/4714446/EventGroups.cap

    Edit: Oh, just saw yours, yeah both works. Mine is more for global things like menu screens and etc, so that you don't rely on any object to hold the values directly, both are good solutions I think <img src="smileys/smiley1.gif" border="0" align="middle">

  • Thanks for the cap <img src="smileys/smiley2.gif" border="0" align="middle" /> !

    Problem solved.

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