[SOLVED] Disable all Groups at the same time

For questions about using Classic.

Post » Thu Jul 11, 2013 7:43 pm

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.Lapstern2013-07-11 21:48:00
B
5
S
1
Posts: 36
Reputation: 653

Post » Thu Jul 11, 2013 7:53 pm

@Lapstern 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

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 (it also has a link to the newest version of Construct Classic, Version R2 on Source Forge)Jayjay2013-07-11 19:58:48
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481

Post » Thu Jul 11, 2013 8:23 pm

Hmmm....
Not sure about how to introduce your technique :/
Could you make a screenshot for me?
Or an example cap?
Thanks.
B
5
S
1
Posts: 36
Reputation: 653

Post » Thu Jul 11, 2013 8:58 pm

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 Lapstern2013-07-11 20:58:51
B
5
S
1
Posts: 36
Reputation: 653

Post » Thu Jul 11, 2013 9:30 pm

Sure, here's a cap : 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 Jayjay2013-07-11 21:31:35
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
102
S
35
G
17
Posts: 2,158
Reputation: 18,481

Post » Thu Jul 11, 2013 9:47 pm

Thanks for the cap !
Problem solved.
B
5
S
1
Posts: 36
Reputation: 653


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests