Update or Create instance variables of all selected object instances in the Scene Editor

Hello!!! :wave:

When I select multiple instances in the scene editor and try to change the instance variable for all of them, only 1 changes.

I know about this topic: Change value to variables to multiple instances in editor
But the answer of Gruk didn’t help-me and because it’s a old post I thought was better to create a new one.
I don’t wanna change the variable of object (for all instances), but just for some. In my case I am dealing with more than 20 external layouts and the number will increase considerably. It’s to many instances.

I’m considering creating different objects in place of each variable. Or maybe create new layers just for that. Either way, it’s going to be quite a lot of work and confusing. I think that being able to change the variables of selected instances at once will save a lot of time and make things much simpler.


1 Like

I apologize, but I’m not actually sure what you’re asking for.

What specifically are you wanting to do? External layouts don’t show up in the scene editor for normal scenes. Are you wanting to change instance variables via events, or something else?

Oh, no. I’m sorry. I’m not trying to change instance variables via events. I think with image will be better for explain.
In scene editor with layers I can pick multiple instances and change the layer just 1 time for all of them. For variables it don’t works. In image, I selected 7 instances, but if I change the variable “Colisao” it will change only 1 instance.

My levels are build with “pieces” of external layouts for make some randomic levels. What i want is to change a instance variable “Colisao” to active/desactive/wait or another string of some instances. That will be important for optimization when i check them.

The problem is: I have to many instances in my external layouts to change the variable picking 1 by 1. Like I said before, maybe the solution can be using layers and events for it instead to change in scene editor. But I think it is very necessary to be able to change several instances at once. Will make the things much simpler.

1 Like

Thank you for the clarification, that makes sense to me. I’ve updated the topic subject to be a bit more specific.

For your use case, a current workaround would be adding objects in your layouts into a global object group specific to that external layout. (e.g., you have externalLayoutA, B, C, etc. In externalLayoutA, you’d add all of the objects to a global object group of “LayoutAObjects”)

Then you can target all objects on that group after you create them via events, to set their variable to whatever you want. That would allow you to identify any objects created in Layout A vs Layout B, etc.

1 Like


Basically I encountered the same issue, so I just post here to say I think it would be a good and logic feature.
What’s more, it currently looks a bit tricky, since GDevelop allows me to select several instances and edit their instances variables in the properties panel, but it actually doesn’t do it.

Depending on the cases there might be workarounds, but they are limited:

The solution of using objects or groups to massively modify instances variables only works if all instances of an object or a group are concerned. However one might want to edit object variable for some instances only in an object/group, and not all of them.

In this topic Change value to variables to multiple instances in editor, Gluk proposed a solution of having events at the beginning of the scene to edit these instances variables at the beginning of runtime.
However this works only if the desired instances have common points that help to massively filter them to edit their object variables (for example instances’ position between x and y boundaries, instances on a same layer, all instances close to another object, etc.)

1 Like

Hello everyone,
Does anyone know if this feature would be added anytime soon?
I didn’t see it in the roadmap, so maybe not?
I just ask to know if I should work on a workaround, or wait for the feature to be fixed
thanks! :slight_smile:

Hello @Bluzima thank you for coming back.
Unfortunately, working on this possibility hasn’t been added to the backlog yet, so I would say that you can use the work around until we can address the cause of the issue.
My apologies.

Thanks a lot for your reply @Luni
That’s fine, little by little GDevelop got better and better since I started using it, it’s great!
I’ll go with a work around for now then