Page 1 of 1

swap the positions?

PostPosted: Sat Apr 02, 2016 4:29 am
by scorepixel
to swap the positions of random way objects in specific fields.

please please. :shock: :o

Re: swap the positions?

PostPosted: Sat Apr 02, 2016 8:19 am
by glerikud
Can you be a bit more specific about what you want to achieve?

Also, this topic should be in the How do I section: how-do-i_f147

Re: swap the positions?

PostPosted: Sat Apr 02, 2016 7:56 pm
by scorepixel
Thanks for helping @glerikud

Re: swap the positions?

PostPosted: Sun Apr 03, 2016 9:30 pm
by famousgnu6
Not very specific but I think the logic should go something like this;

1) Get coordinates of object 1 and save as value
2) Get coordinates of object 2 and save as value
3) Destroy object 1
4) Create new object 1 in object 2 coordinates
5) Destroy object 2
6) Create new object 2 in coordinates of object 2

Re: swap the positions?

PostPosted: Sun Apr 03, 2016 10:44 pm
by scorepixel
Thank you for your help. I ended up studying arrays and it worked. @famousgnu6