Trooper Dan, on 20 October 2017 - 10:02 AM, said:
I can see the point in making states here, although I simply can't make it to work...
state updatevalue { getplayer[THISACTOR].wackedbyactor killer getactor[killer].picnum tempkiller ifvare tempkiller APLAYER { ifhitweapon { addvar rpgsammo 10 } getactor[killer].yvel tempkiller setplayer[tempkiller].max_ammo_amount RPG_WEAPON rpgsammo } } ends --- ifdead { state updatevalue
I am drawing the rpgsammo through digitalnumberz so I can keep track of it as I'm killing players and dying to players. No matter what it wont increment, and it also just sets the maxammo to whatever the value the variable was declared with in the first place. Actually I'm doubting that I'm using ifhitweapon correct, because when I place the two lines below into the if-statement together with "addvar rpgsammo 10", it wont even set maxammoamount
