Hendricks266, on 20 October 2017 - 02:58 PM, said:
state updatevalue
getplayer[THISACTOR].wackedbyactor killer
getactor[killer].picnum tempkiller
ifvare tempkiller APLAYER
{
addvar rpgsammo 10
getactor[killer].yvel tempkiller
setplayer[tempkiller].max_ammo_amount RPG_WEAPON rpgsammo
}
endsifhitweapon
{
ifdead
{
state updatevalueIf this doesn't work, there may be something that prevents setting max_ammo_amount from working, and in thta case I'll look into it.
Now I've tried what you suggested, and thanks for that btw!, but it still won't work. It sets the maxammo to the variable plus the value you add, in this case 10 - but only once. I'm drawing the value of the var rpgsammo on my screen and it doesn't update when 10 is added. It remains whatever I declare it to. Summing up: After a kill the actual max_ammo_amount and rpgsammo doesn't match, and the max_ammo_amount wont increment on kills past the first one.

Help
Duke4.net
DNF #1
Duke 3D #1



