How do i stop an attribute going into minus?
beefy_clyro
Member Posts: 5,394
Ok so i have an attribute for ammo and when you fire, it deducts one. When you get to zero you need to press the reload button. The problem i have is that if you press fire when on zero it goes to minus 1, how can i make it just stop on zero and obviously wont fire until you hit reload? Thanks in advance
Comments
Wrap it in a Rule like this:
Rule
When game.ammo > 0
Change Attribute: game.ammo To: game.ammo - 1
Think that would work....take a look at the attributes page on:
http://gamesalad.com/wiki/how_tos:gsc_create_attribute