Touch Controls - Left/Right but hold down to attack
baronedevelop
Member, PRO Posts: 9
I have some rules where the hero can be moved left and right by touch. I want the player to attack when holding touch down after 0.5 seconds. This is all working but the issue is when the player moves left and right for >=0.5 seconds the player attacks. I want the attack to happen only when touch is not moved left and right but held place. I need help figuring out the rule to detect if touch is pressed but not moved to attack. Thanks for any help.
Comments
How does the action that triggers the attack differ from the action that makes the character move ?
I have a code snippet template the does that. It was designed for a run jump but can be modified for run/attack. I'm on my iPad but I'll find it and post it.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Guru: Thanks. Socks: The action will trigger by touching and holding for at least 0.5 sec and not moving left or right.