mikewalton206 wrote:Oh so you are trying to make this same thing but instead of keyboard you wanna do on touch?
briggybros wrote:If you are making a game where the object has a built in behaviour, there should be a behaviour event which would suit the case better
Or you could use the on touch end functions.
If you have representations of the keys in game you can use a system like:
irina wrote:try this aproach:
use dummy sprite (blank, invisible)
and set it to create on any touch at touch x and y
than set your events something like this:
on touched sprite + if dummy is overlaping that sprite + set that sprite variable from 0 to 1 = key pressed action
and something like this:
on any touch end + sprite has variable 1 + dummy gets destroyed = key released action
and then return sprite variable to 0
briggybros wrote:Start the animation using the object touched event, not the is touching. And use the on touch end to finish, not the 'x is touching'