I have a slider puzzle with 9 squares (hotspots) and 8 of them have an object on them. How can I create a "reset" and have all the objects go back onto the hotspots where they originally came from?
My guess is that you can do it with variables. Like you can declare some variables outside at the top of the script:
int ObjPositionX, ObjPositionY;
Then on room_load you set the variable to be the init object position:
ObjPositionX = oObject.X;
ObjPositionY = oObject.Y;
When you need to reset then you can do the opposite:
oObject.X = ObjPositionX;
oObject.Y = ObjPositionY;
Thank you Vincent for your suggestion. I ended up doing moves. I was looking for a quick way, like move object 1 to hotspot 1, without have to figure out the coordinates.
Wait(10);
object[1].Move(85, 95, 5, eNoBlock, eAnywhere);
Wait(2);
object[2].Move(135, 95, 5, eNoBlock, eAnywhere);
Wait(2);
object[3].Move(185, 95, 5, eNoBlock, eAnywhere);
Wait(2);
object[4].Move(85, 145, 5, eNoBlock, eAnywhere);
Wait(2);
Hotspots have WalkToX and WalkToY properties, they are usually meant for character walking to hotspot, but you may utilize these for your purpose:
object[1].Move(hotspot[1].WalkToX, hotspot[1].WalkToY);
Nice! Thanks.