Drag and drop problem

JolandaJolanda Member Posts: 82
edited November -1 in Working with GS (Mac)
Hi,

When i have several drag and drop objects on the same place, like u bunch of leaves, the objects above each other stick together, when i will move them, all the leaves moved.

I want to move them separately without sticking together.

whats the behavior for this?

I use now:

When attribute Self.drag is true
Constrain attribute self.position.X game.Mouse.Position.X
Constrain attribute self.position.Y game.Mouse.Position.Y

Tried both: in actor editor, and in attribute place.

Thanks for the reply, Jolanda

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    You need an integer to determine what is being dragged or they will all bunch up together.

    In the leaf_1 actor touch is pressed change attribute game.leaf to 1

    If game.leaf=1 and self.drag is true......

    leaf_2 actor...touch is pressed change attribute game.leaf to 2

    If game.leaf=2 and self.drag is true....

    This way only 1 leaf will be movable at any one time.

    Darren.

    image
  • JolandaJolanda Member Posts: 82
    It works!

    I had already asked this question in the forum weeks ago, but finally a good answer and immediately.

    Thank you.
    Now i can go on whit the game.
  • UtopianGamesUtopianGames Member Posts: 5,692
    GL with your game!

    Darren.
Sign In or Register to comment.