Very Basic question about instance variables

How do I identify an object by their instance variable in an action/event editor?
Can’t seem to find anywhere that shows the basic editing formats.
Object/variableID
I have made several Objectstacks that have Variable ID’s. need the write
"Add Object 1 on top of ObjectStack/Variable ID1

Tween position of Object 1 to x:ObjectStack/Variable ID1,y; ObjectStack/Variable ID1

I had it working with many different objects (that were the same) but would rather use the variable ID’s.

Is there anywhere on gdevelop to learn the proper way to write all this in the editor?

Condition
Ball.ID = 7

Action
Change Ball opacity set to 20

Thanks @ZeroX4, but I need to identify the object ID in the action - naming the “ObjectStack” and Tween position.

I would assume you need to identify it in event?

BUT in case i am wrong i and you really mean in action then it would be not possible

You check if something is SOMETHING and then you do anything you want to it in action like it was anything

For example
We are teachers

I ask you do you see in class kid in green shirt?
You say yes
And i say go slap that kid in da face

This is how gdevelop work

If i ask you are there kids in the class
You say yes
I say go slap kid with green shirt in the face

That is not possible in gdevelop

Maybe explain exactly what you want to do and there will be some other way to do it

Thank you for the help. I believe I have it working. There was something else that was interfering with the action.

I will let you know if I have another issues.

What I did not know is that when the Object Variable is set once in the Condition, it transfers onto all the Actions that refer to the object.

1 Like