Move object to object with specific ID

Hello. Tell me, how can I make one object move after another, by its ID?

For example, there is an object Pl001, it has a variable ID
There are several objects Pl001 on the scene, but they all have different IDs
So how can I make it so that Pl001.ID=2 moves after PL001.ID=1 ???

Yes, you can make a condition
if Pl001
the variable ID is equal to 2
then PI001
move to the X/Y position of Pl001 (but how can I specify that it should be Pl001 with
ID equal to 1???)

Its kinda backward logic how you need to do it
BUT

Look
1st of all you just filtered your pl objects to one with var 2
So that is the one you will affect at this moment so if you move it to pl object X and Y you will try to move itself

What you can do instead is have separate event
To set pl object X and Y pos with var 1 to some scene variables for example TargetX TargetY let’s call them that

Now in your screenshot you keep it as you have it
But in values you are asking about you just put TargetX TargetY

So other event would be

Condition
Variable VarID of Pl001 = 1

Action
Change variable TargetX set to Pl001.X()
Change variable TargetY set to Pl001.Y()

I guess I’m stupid.
I didn’t quite get it.

Which part you did not get?

I didn’t understand everything

So let’s go step by step

Create 2 number scene variables call them TargetX and TargetY

Ready

Now in action put TargetX TargetY where you have empty values

targetX and targetY what are they equal to?
If run as is, then Pl001 with ID equal to 2 moves to position 0,0
002

And now

Condition
Variable VarID of Pl001 = 1

Action
Change variable TargetX set to Pl001.X()
Change variable TargetY set to Pl001.Y()

Ok.
In principle it works.
What if there are more than two Pl001 objects? (3,4 and more)
Do you need to add more variables targetX and targetY . For example targetX2, targetY2 and so on ???

AND THIS
Depends on what you exactly want to do and when

Cause if you need only one at a time
You can give each Pl001 object variables called PosX and PosY

NOW

When you need it you set TargetX and TargetY to object with VarID 1 X position and Y position
And then you can set object with VarID 2 PosX PosY to TargetX and TargetY

And now TargetX and TargetY can be used for another object
Cause you can move object with VarID 2 to its PosX PosY variables

If you need it for multiple objects at the same time then i have no idea for how to do it other than creating more scene vars like TargetX2 TargetY2

MAYBE it could be solved with arrays but my knowledge about arrays is too low to provide any reasonable solution