GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to drag->drop-> re-drag and record the position? Thank you!!!

teklrncogteklrncog Posts: 5Member, PRO
edited March 8 in Working with GS (Mac)

Hi my friends,

I'm new to game development so this may be a silly question for professionals: I couldn't figure out how to drag-drop-redrag items and record the positions. Thanks to @LumpApps for your inspiring ideas to realize snap to grid. However, I was stuck at recording the positions of the items.

The players have 6 identical items to move around. They are asked to put the items into rows. On the scene, they can choose to line up the items in one row or two. But the only correct move is to line the items in two rows and each row has three of them. I have a prompt-like thing in the front of each row for the players to line the items after (so the items have to be snapped to grid, with 6 potentially available spots for each line).

The issue is that I need to record the position of each item in a table and decide if the six items are lined up as the correct answer. If the player put a certain item in the wrong spot, they should still be able to re-drag the item and change its position. In this case, I don't know how to record the positions to detect if the items are lined up in the correct way. Purely recording the x&y doesn't seem right... should I add other tables or attributes? Could anyone share your insightful ideas? Thank you very much in advance!!

Sign In or Register to comment.