I did originally think about just giving monsters endless powerups with a hacky DECORATE solution, but thought it might be more efficient to try a ZScript solution first.
Alas, I can't seem to alter monster spawning HP at all. I currently have this:
Code: Select all
Class HPModifierHandler : EventHandler
{
override void WorldThingSpawned(Worldevent event)
{
CVar hpSetWalp = CVar.FindCVar('walp_hpmod');
if(event.Thing.bIsMonster == true)
{
event.thing.Health *= (1*(hpSetWalp.GetFloat()));
//event.thing.SpawnHealth() *= (1*(hpSetWalp.GetFloat()));
//Console.Printf("Health is %F",event.thing.Health);
}
}
}
As I'm still a relative noob when ZScripting, I'm clearly missing something.
Thanks for your help!