Drag and Drop
zinapse
Member Posts: 34
Hi everyone,
I just got my first Mac for the sole purpose of building iPad games :-)
This should be an easy one for you - I am trying to get click and drag working so my game will work on the web first (will add iPad controls later). I followed the instructions here: http://gamesalad.com/wiki/how_tos:gsc_drag_and_drop_movement but there is no "Self.DragAndDrop" so I used "Movable".
The "Movable' event triggers correctly but setting the Constrain Attribute of self.Position.X to "game.mouse.position.X" doesn't seem to work.
Could you please tell this nube what he is doing wrong, ty :-)
I just got my first Mac for the sole purpose of building iPad games :-)
This should be an easy one for you - I am trying to get click and drag working so my game will work on the web first (will add iPad controls later). I followed the instructions here: http://gamesalad.com/wiki/how_tos:gsc_drag_and_drop_movement but there is no "Self.DragAndDrop" so I used "Movable".
The "Movable' event triggers correctly but setting the Constrain Attribute of self.Position.X to "game.mouse.position.X" doesn't seem to work.
Could you please tell this nube what he is doing wrong, ty :-)
Comments
Glad to see that you found the wiki and are trying to learn for yourself! The amount of new people that post the simplest questions is ridiculous.
Good luck!
EDIT: You can find lots of demo's, you can search for them in the top right hand corner. I actually forgot that I have a drag and drop test that I created for myself a while ago. Feel free to check that out.
Yes I am trying to learn from the tutorials and examples but they sometimes skip important steps so I felt I had to ask the question!
I will try creating the attribute however logically if the movable event is working (I set another behaviour to test it and that worked) then the constraint attribute change should work too.
I'll let you know the results.
So the issue is that setting "self.Position.X" to "game.Mouse.Position.X" doesn't work.
I added an "Accelerate Toward" just to prove the Drag and Drop rule was being invoked and that works so there is something wrong with the above settings - any ideas?