making a character run
pipe
Member Posts: 54
i can make my character walk if you press a button once but I want my character to run when you press the button twice and hold
Comments
Please help us lol
Create a real attribute called self.touchTime and set it to some huge number (e.g. 999999).
When touch is pressed
Change Attribute self.touchTime to self.Time
When self.Time > self.TouchTime+2
[behavior to make the player run]
Otherwise
Change Attribute self.touchTime to self.Time+999999
The +2 forces the player to hold the button down for 2 seconds. You could make it 1 second or 0.6 seconds or whatever you prefer.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User