New Action>Activate or Deactivate event group at runtime!

I wish gdevelop gets the ability to Activate and Deactivate event groups at runtime!

Why do we need it?
-Game optimization - Stop the engine from checking events that are not required when they are not required
-State machines - A state machine can be made by activating one group at a time, depending on a “state” variable

Anyways, I hope you see why it is extremely useful. Both clickteam fusion and Construct2 also have it for a good reason.

Maybe having them could make the things cleaner, but you can do it by yourself just adding a “master” parent event inside the group, checking a scene variable condition with the name of the group, this way:

My Group ........Variable(My_Group) is = 1 ................Events for My Group

Just set Variable(My_Group) = 0 or 1 when you want to de/activate the group events :slight_smile:

this is a nice workaround, but I still wish we could do it as cleanly as the others.

That’s not a workaround : that’s how it should be done. Have you ever seen a language where you can say “Please, deactivate source code from line X to line Y” ?

I thought that groups were more like containers.

If we consider event groups has just region of code, they should as Victor said be able to be deactivated.
But in a more pragmatic way, as they are used as “big” container of events, it could be useful indeed.

so you would consider the ability to activate/deactivate groups during runtime like the other engines? :slight_smile: