How can I? Drag and Drop on Isometric Grid

Get help using Construct 2

Post » Thu Sep 10, 2015 4:55 am

Hi there,

I've created an isometric board with rex rainbows plugin and I would like to allow the user to drag and drop their tokens from a selection box at the bottom. Basically they can pick up the piece and put it anywhere on the board so long as it is not already taken by another chess.

Right now I'm just experimenting because I'm not quite sure how to accomplish this. I've added the drag and drop behaviour to the object to see if this is possible and I am able to move the sprite around the screen and drop it somewhere. basically anywhere on the screen which I don't really want. When I do drop it I'm able to destroy the sprite and create a chess but it doesn't create where I drop the sprite.

First of all is this possible?
Second, if it is, should I be using drag and drop behaviour or is it not compatible with rex's isometric board addon?
Third, Is there a way to just drag and drop the chess and snap it to the isometric grid without using a sprite and destroying the sprite as a placeholder?

Thanks so much for your time. I apologize if this has been covered I spent a good deal of time searching for the answer but could not find one based on the conditions I am using. I have spent a good deal of time away from construct 2 and am trying to pick it back up again so I could use a little help thank you.
B
7
S
2
Posts: 12
Reputation: 551

Post » Fri Sep 11, 2015 11:29 pm

Image

We have a "dragNdropPiece" and a "piece." These two sprites are identical. You create a dragNdropPiece on "pickup" and destroy it on "dropping" after you have created its copy on the board.

Eventually, I will make an example capx for you... PM me for more info.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Sat Sep 12, 2015 12:37 pm

Hi there gumshoe. Thanks so much for posting this, I understand how it can be done now. Not doing it exactly the same as your answer but I understand now that I need to use a swap piece. No need for a capx I think I'm good, I'll hit you up if I have any further problems with this but I think this will get me going again thank you so much!
B
7
S
2
Posts: 12
Reputation: 551


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, maranpis, missile, oosyrag, Yahoo [Bot] and 30 guests