Count Down on a clickable button
TyDietrich
Member Posts: 45
Hey everyone, i have a button that is pressed to fire bullets in the game. Currently I have a display text in the button that shows how many bullets i have. The only problem I'm having is that when i continue to click the button when my bullet count is zero the numbers start to go negative (0,-1,-2, etc.). I want it so nothing happens when you click on the button and you have no ammo. (nothing happens past 0 if you continue to click the button).
Comments
use the script you have put together already but insert it in a rule that says if bullets > 0
Or you could use an index attribute. That way when you have 0 bullets and press again i still will be zero.
Thanks Dues that worked
You are welcome
Oh and when you want someone to know that you mentioned them in a post put an @ in front of their username like this: @TyDietrich and they will be notified