Page 1 of 1

Modifying projectile's damage in its states

Posted: Sun Aug 19, 2018 3:19 pm
by Tango
I have a projectile whose damage I want to increase at certain points during its states (specifically, in its bounce states). I have tried the following in ZScript:

Code: Select all

	Bounce:
		TNT1 A 0
		{
			damage = 20;
		}
		Goto Spawn;
However, doing so gives me the following error:

Code: Select all

Expression must be a modifiable value
Is there another way in ZScript for me to modify a projectile's damage on the fly?

Re: Modifying projectile's damage in its states

Posted: Sun Aug 19, 2018 3:23 pm
by Blue Shadow
Use [wiki]SetDamage[/wiki].

Re: Modifying projectile's damage in its states

Posted: Sun Aug 19, 2018 3:30 pm
by Tango
Wow I did a terrible job searching for that. I didn't bother searching for anything without an A_ prefix, and didn't check the list of ZScript functions. Thanks for saving the day as always Blue Shadow, you are an angel