button help
as7494
Member Posts: 70
How can i make a button that actually stays either touched up or touched down? I want my button lets say to be able to keep value and change certain attributes when its pressed down without it coming back up immediately after the touch is released? I tried using rules with and without the otherwise statement, but I cant get this behavior. Can anyone help?
Comments
1. The image animation (if there is one) and
2. The rules set in that actor
If the rule is 'when actor is pressed' and you then have it set an attribute to a value it will not change unless you tell it to in the otherwise or another rule to say 'when that actor is released'. IE set it on touch and it will stay that way even if you release the button.
However it appears you are talking about the visual of the button and I therefore suspect you have an animation on the button actor so all you would have to do is to remove the images in that animation that have it pop back up ie: leave only the down pressed images in the animation
Rule1: If game.button > 1 change attribute game.button to 0
Rule2: If touch is inside change attribute game.button to game.button+1
Then do what ever you want when game.button is at 0 and game.button is at 1.
This is the way i do it for sound on off for eg but TSB's works great too.
Darren.