Calling a global variable depending upon current object (in a group)

So I’ve set up a scene that creates an object from a group depending upon a global variable. I want each of these objects in this group to have different stats, so I’ve made global variables for each (so they don’t get destroyed). These global variables have the same name as the objects.

e.g. object Bob. Global variable is Bob, with child variables HP, attack, defense, speed, jump.

How would I go about calling upon the specific variable for the current object? Is there a way to call a global variable inside of another one, or use the current object name in an expression?

Sorry for my vagueness. I’m very new to this.

1 Like

You will need to read this: Variables [GDevelop wiki]
All of it, especially the last parts.

If there are several Bobs, you should add an ID object variable, so you can tell them apart.
If not, just click on the expressions blue button to access variables.
image

2 Likes

Thanks for your help. I read the link a couple of times and even though I can sort of see what I’m supposed to do, I still couldn’t figure it out. That’s okay though, I just used external events to accomplish the same thing. Maybe I’ll go back to this later and try and figure it out.