[DONE 5.4.207] Variables for groups

Feature done on Release 5.4.207 · 4ian/GDevelop · GitHub

After the latest update, 5.4.205, it is no longer possible to use variables for a group if all the elements of that group do not have the same variable declared.

I have groups with many elements that change continuously due to workflow needs.

Is it possible to introduce variables for groups? It seems to be really essential, fundamental, useful for optimization and work speed.

Or, when creating a variable for a group, it could simply be assigned to all the objects. This would also be useful for modifying dozens of variables of different objects with a single click.

9 Likes

I would love variables for groups as well.

Since the new variable system does still allow for dynamically created child variables for structures and arrays, when I do need something like what you’re describing with dynamic variables, I have switched to adding a structure variable (or array) named “Logic” to all of the group members.

Then I can create the child variables without declaring them via events.

I’d still prefer to only have to create the structure at the group level, but this has simplified the new process for me in those use cases.

4 Likes

I like this feature request and think you should expand on it to not only include variables, but effects and behaviors as well. You can select the Group and choose a Properties option, then the typical pane would open with a variable, behavior and effect tab. You can add or delete what you want and apply it to the whole group.

You could still edit individual objects of the group to have different values or settings of the variables/behaviors/effects in the usual way.

But even if you keep this feature request for variables alone, I still think it’s a good idea.

3 Likes

I completely agree. Managing many objects with a single group is essential.

I really hope that features like these are introduced soon!

3 Likes

this is something I’ve always wanted.

2 Likes

This is actually a really good idea, it could help making a lot of things way easier, like for hp and stats for an enemy group, without having to declare these variables in each object.

4 Likes

This was added in the last update.:partying_face:

2 Likes

Woooow, it’s really great! Thanks!