Groups suggestion

Discussion and feedback on Construct 2

Post » Wed Dec 11, 2013 4:22 pm

Busy with some events and groups when I realised that a group like class would rock !!!

I mean, like, have a special group, and use that kind of group in your application with the same name. And when you disable that group ... ALL groups get disabled having that name.

Just imagine having lots of groups like "audio" over various sheets and layouts... applied in all sorts of sub events ...

Then in the main menu you disable group audio .. and boom ..everywhere audio is disabled.


This functionality kinda resembles css classes ... and would totally rock cs2 usability in sense of ease of disabeling an element on the fly throughout your project.

Lennaertlennaert2013-12-11 16:25:17
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Wed Dec 11, 2013 4:26 pm

Just create a new event sheet called "audio", with a "audio" group on it. Now import that event sheet into wherever you want, and disable the group whenever you want.

Using groups with the same name in different layouts is bad pratice. You can easily make a group global by adding it to an event sheet, and referencing that event sheet everywhere else though.
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Wed Dec 11, 2013 4:27 pm

Also families would help, dont they?
Image
Check out our start-up and configure your own helmet in true 3D.
B
44
S
11
G
11
Posts: 1,154
Reputation: 9,988

Post » Wed Dec 11, 2013 4:54 pm

Another solution is to have a function call on a common event sheet. The function can either turn off sounds itself, or turn off groups in the active event sheet. Whatever you want really!
B
28
S
8
G
5
Posts: 429
Reputation: 7,007

Post » Wed Dec 11, 2013 5:00 pm

How can you disable Groups? Last time I looked there was only an activate Group command. Did I miss it?
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
56
S
17
G
6
Posts: 748
Reputation: 9,420

Post » Wed Dec 11, 2013 5:14 pm

[QUOTE=andreyin] Just create a new event sheet called "audio", with a "audio" group on it. Now import that event sheet into wherever you want, and disable the group whenever you want.

Using groups with the same name in different layouts is bad pratice. You can easily make a group global by adding it to an event sheet, and referencing that event sheet everywhere else though.[/QUOTE]

would require extra event sheets .... or globals.

The suggestion was for a new special group, just for this purpose.
Or perhaps a tick option in the group edit, 'class group' or something.

It would be far easier then tinkering around with extra sheets..

this way you could simply ref the group from any layout...


[QUOTE=Beaverlicious] Also families would help, dont they?[/QUOTE]


not quite

[QUOTE=Tobye] Another solution is to have a function call on a common event sheet. The function can either turn off sounds itself, or turn off groups in the active event sheet. Whatever you want really![/QUOTE]


woudl require functions etc etc

With a simple few subs below a group you can really manage grouping activity very effectiely ... and simple



[QUOTE=Bl4ckSh33p] How can you disable Groups? Last time I looked there was only an activate Group command. Did I miss it? [/QUOTE]


select actioon -> activate group .. and edit the action to "disabled"
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Wed Dec 11, 2013 8:40 pm

You could just use a global variable instead. Have all audio code in each place be a subevent of an event with the condition if audio_on = 1. Setting it to 0 deactivates it everywhere with one action.Arima2013-12-11 20:41:31
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Wed Dec 11, 2013 9:10 pm

audio is just one application ...

spawning ...
menus ...
controls ...
movements ...
you name it ...




groups are very versatile .. this will add greatly to ease of implementing global or partial disabled/enabled elements for anything created in cs2 with a very clear purpose and do right by its name :) groups
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 13 guests