How do I apply a "variable ID" onto a newly created object?

Hello good people. I’m very new to this still (1 1/2 weeks) and I have hit a wall in my current project.

I have a series of Letter sprites: Lettera Letterb Letterc etc.

I placed these into a group

I can create a object from the group using create by name: “Letter” + VariableString(LetterVar)

But I want to hold it in one place for a few seconds before it moves. So I set a timer.

But this requires me to call upon it under another condition to when the timer reaches so long. However, I have no idea how to call the specific one I Just made. Because I can only call upon the group.

So, this means that the next one I create will be ignored by the second condition.

So how do I move a specific Sprite that has been created?

I see people mention “Variable ID” but I don’t know how to apply it or use it, and can’t find it in the documentation and can’t find any tutorials about it.

Most posts about it are people who seem to know what to do with it, but it’s completely new to me.

Seems to be the solution to my issue, so can anyone point me to a tutorial or any place the comprehensively explains it? I haven’t had much luck finding anything.

If I can’t do this, then my solution has been to destroy it after x amount of time, then recreate in the same place in a new condition and have it move into place. But this seems like a bit of a clunky way to do it.

I’m creating a video stay tuned
Variable counter ++
or Extension UUID
Here:

1 Like

In GDevelop actions following a create object action only affect that object. That only works if ou use the same object name. If you are using a group, simply use the group name and it won’t affect all the group, only the created object:

2ONmJrWeOq

All you need to do is to start a timer only for that object:

cANFqmz0Tx

Just don’t forget to pause and reset the timer after you are done so that it doesn’t keep on triggering the timer :wink:

This is not really a feature of GDevelop, it’s just people using a variable that they name ID :laughing:
Note that people often mistakenly think Object UIDs is going to solve all their problems, when often there is an easier and better alternative. Using UIDs most of the time just makes you take a detour from what you actually want to do, making your code less readable and performant. You very very rarely actually need an object UID.

2 Likes

Please tell me: the object has the ID variable by default. Isn’t it installed automatically? I thought it was like that before.

I am a relatively recent user as in I have not used GDevelop before GDevelop 5, but since GDevelop 5 I can assure that there never was such a feature.

1 Like

Thanks. I was talking about GDevelop 5 and, therefore, I was mistaken in thinking that there is such a thing.

1 Like

I figured what people were doing and how it works.

When you make a object by it’s name, you can change the object variable by referring to it by its group name. So change object variable by group name. Then call the variable “id” (or call it anything) and give it a number, like 1, and it will apply only to the object you just made.

Then in the conditions ask: Is the Object Variable of “group name” = 1

So then only the objects in the group with an id of 1 will have actions done to it.

Actually very simple but if you don’t know …

Me figuring out how it works: