how to set button to false after being pressed.. Tap Tap
![app-etite](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
hi,
My character runs forward and pics up objects off the ground by pressing a button. when i press the button he collects the objects and when i let go of the button he does not, thats all good.
But what I don't want is the player to be able to just hold the button down to pick up all the objects in his path which is what is happening. I want the player to press the button to pick up an object and then to pick up the next object the player will have to let go of the button and press it again. much like the music tap tap games pressing the button at the right time.
Thanks
appetite games
My character runs forward and pics up objects off the ground by pressing a button. when i press the button he collects the objects and when i let go of the button he does not, thats all good.
But what I don't want is the player to be able to just hold the button down to pick up all the objects in his path which is what is happening. I want the player to press the button to pick up an object and then to pick up the next object the player will have to let go of the button and press it again. much like the music tap tap games pressing the button at the right time.
Thanks
appetite games
Comments
when button touched and game.tap = false then change game.tap to true and pick up object
while the players finger is down game.tap will be true and so no more objects will be picked up
when he releases touch then change game.tap to false
now next time he touches the button the process will start again
The default is the unpressed image. Add another condition to your 'pick up' rule.
When the unpressed version is on the button then the objects can be picked up and add Change Image to use the pressed version.
Else Change Image to unpressed.