toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Trouble with ammo regeneration
beckb
Member
Posts:
16
April 2013
in
Working with GS (Mac)
Making number of missile ammo regenerate, but capping max to 5. Thanks this is giving me some trouble
Comments
jamie_c
ImagineLabs.rocks
Member, PRO
Posts:
5,772
April 2013
Set up two game attributes, ammo and maxAmmo.
then set up a rule that does:
if maxAmmo < 5
ammo = ammo +1
This will add 1 to the ammo count as long is maxAmmo is less than 5, once it equals 5 it won't add anymore.
Sign In
or
Register
to comment.
Comments
then set up a rule that does:
if maxAmmo < 5
ammo = ammo +1
This will add 1 to the ammo count as long is maxAmmo is less than 5, once it equals 5 it won't add anymore.