I would to create a "Fire Death Effect" for monsters which activate only if the monster or the player doesn't have a Death.Fire state.
Code: Select all
version "4.0"
Class FlamerHandler : EventHandler
{
Override void WorldThingDied(WorldEvent e)
{
If(e.Inflictor&&e.Inflictor.DamageType == "Fire")
{
e.Thing.GiveInventory("FireDeathEffect",1);
}
}
}
Class FireDeathEffect: Inventory
{
Override void AttachToOwner(Actor other)
{
self.height=other.height;
Super.AttachToOwner(other);
}
Override void DoEffect()
{
Super.DoEffect();
If(Owner && (Owner is "ExplosiveBarrel") && !(Owner is "LostSoul") && !(Owner is "PainElemental") && !(Owner is "CyberDemon") && !(Owner is "SpiderMastermind") && !Owner.FindState("Death.Fire"))
{
Owner.bFLY = False; Owner.bNOGRAVITY = False; Owner.bNOBLOOD = True;
Owner.height = self.height; //Reset the height
Owner.A_SetTranslation("Scorched"); //Set a color translation
}
}
}
Code: Select all
// TRANSLATE
// Monsters Killed by Flamethrower - by Jekyll Grim Payne
Scorched = "0:255=%[0.00,0.00,0.00]:[0.33,0.33,0.33]"