Actor move up every time screen is pressed
justinodunn
Member, PRO Posts: 226
in Tech Support
Hello, how do I make it to when the user touches the touch screen actor, it will cause the actor to move to a specific position, but when they press again, it'll move to another specific location? so there will be a list of specific locations that the actor will move to in order, whenever the screen is touched. Thanks
Comments
?
You should create a variable that tracks the touch count. So every time you touch it increases by 1.
And in the actor;
--If game.touchCount == 1
---Interpolate self.x, self.y to 222, 333 (or the positions you want)
--If game.touchCount == 2
---Interpolate self.x, self.y to 444, 555
etc.
etc.
Thanks, but how can I track the touch count?
heres what i have so far.. the first touch works but second touch already doesn't work.
can you take a look at it? thanks
doesn't touch count recognize how many fingers are on the screen?
I can't do downloads right now so I can't check the zip.
You want to setup a rule like;
if touch is down: game.touchCount = game.touchCount + 1