How can I? Drag and Drop on Isometric Grid

0 favourites
  • 3 posts
From the Asset Store
Snap to visible grid - perfect solution for any game genre
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)