what I'm I doing wrong?...see pic
![sdsmith64](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
ok...so i'm trying to get the actor to move with the finger of the player....
http://www.flickr.com/photos/61270786@N04/5577859854/sizes/l/
http://www.flickr.com/photos/61270786@N04/5577859854/sizes/l/
Comments
Not 100% sure but I think
Constrain Attribute: Self.Position X TO game.Mouse.Position.X
Constrain Attribute: Self.Position Y TO game.Mouse.Position.Y
Make sure you use Constrain and not Change as Constrain constantly updates.
how big is your scene size?
youll have to add a offset for the mouse position if you made it larger then what its normally set at
When Actor receives event - Touch - Pressed
Constrain Attribute: Self.Position.X to Game.Mouse.Position.X
Constrain Attribute: Self.Position.Y to Game.Mouse.Position.Y
Mine works perfectly fine when I click on the square and it follows the mouse.
The only thing I can think of is that in the video, you are editing the prototype of the actor. The code doesn't matter if it is in the prototype or the instance. Perhaps you forgot you have code in the instance, and not the prototype of actor 1 saying when it is pressed to go somewhere or destroy.
That would be the only reason that box disappears. You must have code elsewhere telling that Actor 1 to either move, destroy, or turn alpha to 0.
Download Link: http://dl.dropbox.com/u/4841281/Drag Demo.zip
-Josh
EDIT: Please tell me once you download so I can remove it from my public folder.
-Josh
self.postitionX to devices.mouse.positionX
Your only other option would be to let one of us look at your project. I think we can agree you have to have code elsewhere effecting that actor, the code we gave and that is in your video should work.
Magic101hi(@)yahoo(.)com
-Josh
-Josh