is this intended design?
When I use a global object in multiple scenes, I kind of expect that the variables that it has should apply everywhere (global).
Instead It does not update its variables when used in different scenes.
Where do you store global variables??
How the dell do you access global variables? It is very unclear. Even in the help file!
Objects variables are linked to a specific instance of the object, so that’s why it’s not shared between scenes. (Even if you can declare a “default” value for the whole object type)
how do you access global variables?
Just use :
GlobalVariable(myVar) or GlobalVariableString(myVarStr)
is there a list in gamedevelop to add/remove them? If not- why? This is such a basic thing
nevermind I found it
As the global variables are related to the entire game, just right click on the Project and go inside “Global variables”.
I still think a global object should really have global variables. Its that way in multimedia fusion
It’s still a nonsense. Just create a standard global variable and it will be the same.
Global objects are global because they can be used on any scene, but they are not persisted between scenes, that’s not their role and it will never be (it’s by design Scenes are independant.).
i see. Sorry for bringing it as a bug. Got a little bit confused by other software
Scenes may be independent, global variables are not. They’re not called global variables for nothing. The role of global variables is to share values between procedures, subroutines or scenes, they’re losing their purpose if they can not do that. That’s why global variables never lose their values in any other development software (VB,C#,Delphi or MultimediaFusion,Gamemaker, etc.).
A global variable which can not hold it’s value has absolutely no use. In that case you can declare the variable just on scene level, which has the same effect.
Sorry my mistake, It’s global variables of global objects, not just global variables.