Reseting Position of a Random Object

Discussion and feedback on Construct 2

Post » Thu Nov 28, 2013 5:56 pm

I put some Objects on a Layer within an Array at random position
And some more at the bottom that are fix

I want to drag some objects to the one at the bottom

but if i drop an object in an empty space, i want it to return at the place it was before. choosed by the random

Can someone help me on that?
Thank you


My random placement: took from Random Tile map Tutorial

Array set value at (array.curX, array.CurY) to floor(random 0,5))
System Create object Objects on layer 1 at (32 + (array.CurX*64) ,32 + (array.CurY*64))
Objects set animation frame to array.CurValue
B
2
Posts: 3
Reputation: 156

Post » Fri Nov 29, 2013 1:48 am

Create Variables ObjectsX and ObjectsY and set them to Objects.X and Objects.Y respectively. Then use those two when moving it back to original position.

Also this post should be in HOW DO I section.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
86
S
28
G
21
Posts: 1,976
Reputation: 19,306

Post » Fri Nov 29, 2013 6:28 pm

You are absolutly right it shoould be in How Do I
Ill repost Over There for further Help

Thank alot Megatronx
B
2
Posts: 3
Reputation: 156


Return to Construct 2 General

Who is online

Users browsing this forum: The Mnk and 1 guest