Adding an Ammo Counter
JoshuaBaker
Member Posts: 0
I have added a counter so that when my bullet actor is shot from the gun, the counter decreases (starting from 10). Once it reaches 0, it heads into the minus numbers (-1, -2 , -3 etc).
Could i please have some help in fixing?
Comments
On a Mac, you can use an Index attribute to keep the value greater than or equal to zero. On either platform, you can use the max() function which returns the larger of two values. Let's say you have an integer attribute called game.shots that starts at 10. You would do change attribute game.shots to max(0,game.shots-1).
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User