It’s a known limitation of GD, as GD manages the objects lists for you you can’t do in-list operations, as moving two instances in the same list (same object/object group) to each other’s position.
And yes, as you have deducted you need scene variables to store values temporally.
Working with your EDIT general example, the idea would be:
- Pick Seahorse with ID = 2
- Save Seahorse position in variables X, Y
- Pick Seahorse with ID = 1
- Move to position of variables X, Y
Also, take into account that object picking affects the current event and its sub-events only, so you can do things like:
// This event picks the first Seahorse
Conditions: Variable "ID" of Seahorse is = 1
Actions: No actions
// This sub-event picks every instance and then the second Seahorse, changes the pick for this event and its sub-events only
Conditions: Take into account every Seahorse
Variable "ID" of Seahorse is = 2
Actions: Do = Seahorse.X() to the variable "X"
Do = Seahorse.Y() to the variable "Y"
// Sub-sub-event, still referring to the second Seahorse
Conditions: No conditions
Actions: Do + 90*TimeDelta() to the angle of Seahorse
// Sub-event, still referring to the first Seahorse
Conditions: No conditions
Actions: Move Seahorse to Variable(X) ; Variable(Y)