drag and drop doesn't work :(
eden111
Member Posts: 25
i have tried to do it, but it didn't work (nothing happened)....
can you help me please?
pictures of what i did:
http://i36.tinypic.com/v820jl.png
http://img39.imagefra.me/img/img39/2/10/2/f_v2ghuxqhm_60dd8a9.png
i added DragAndDrop to the attributes and i started my game as default.
what did i do wrong?
tnx in advance
can you help me please?
pictures of what i did:
http://i36.tinypic.com/v820jl.png
http://img39.imagefra.me/img/img39/2/10/2/f_v2ghuxqhm_60dd8a9.png
i added DragAndDrop to the attributes and i started my game as default.
what did i do wrong?
tnx in advance
Comments
It looks like you've successfully set up your actor to recognize when it's being touched -- great! Now you'll probably want to do something with that information, such as
When self.DragAndDrop = 1,
- constrain self.Position X to mouse.Position X
- constrain self.Position Y to mouse.Position Y
http://img39.imagefra.me/img/img39/2/10/2/f_v2ghuxqhm_60dd8a9.png
Everything looks fine assuming the game.Mouse.Position.X and game.Mouse.Position.Y attributes were grabbed from the expression editor and not just typed in.
I just set up a new project with an actor with the same behaviors (as far as I can tell from your pictures), and it works fine. Perhaps there is something else that is interfering?
As a side note, you can achieve the same thing by just doing this:
When actor receives event [touch] is [pressed],
- constrain self.Position X to mouse.Position X
- constrain self.Position Y to mouse.Position Y
The mouse positions weren't grabbed from the expression editor...
thank you cobra also!