When touched spawn actor
Eminem
Member Posts: 667
I know how to when touched anywhere onthe screen it spawns but what I want to do is the same thing but only when pressed on actor.
So what I need is when the user touches anywhere on the actor it spawns on the exact location the persons finger has landed???
Thanks Appreciate it
So what I need is when the user touches anywhere on the actor it spawns on the exact location the persons finger has landed???
Thanks Appreciate it
Comments
Constrain Attribute game.TouchX to game.Touches.Touch 1.X
Constrain Attribute game.TouchY to game.Touches.Touch 1.Y
NOTE: Touches.Touch 1.X can be called by selecting the Expression Editor, then choosing "Devices", then "Touch", then "Touch 1", then X.
After adding those behaviors to the actor, add this rule.
Actor receives event touch is pressed...
Spawn Actor "actor name"
X = game.Touch X
Y = game.Touch Y
Hope this makes sense.