Classes:ID24Incinerator

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! You do not need to copy this actor's code into your project! Here's why:
  1. This actor is already defined in GZDoom, there's no reason to define it again.
  2. In fact, trying to define an actor with the same name will cause an error (because it already exists).
  3. If you want to make your own version of this actor, use inheritance.
  4. Definitions for existing actors are put on the wiki for reference purpose only.
Incinerator
Actor type Weapon Game MiniDoomLogoIcon.png (Doom)
DoomEd Number None Class Name ID24Incinerator


Classes: InventoryWeaponDoomWeaponID24Incinerator

The Incinerator uses fuel for ammo, and spews a steady stream of flame at a distance. Not to be used up close.

ZScript definition

Note: The ZScript definition below is for reference and may be different in the current version of GZDoom.The most up-to-date version of this code can be found on GZDoom GitHub.
class ID24Incinerator : DoomWeapon // Incinerator
{
	Default
	{
		Weapon.SelectionOrder 120;
		Weapon.AmmoUse 1;
		Weapon.AmmoGive 20;
		Weapon.AmmoType "ID24Fuel";
		Inventory.PickupMessage "$ID24_GOTINCINERATOR";
		Tag "$TAG_ID24INCINERATOR";
	}
	
	States
	{
	Spawn:
		INCN A -1;
		Stop;
	Ready:
		FLMG A 1 A_WeaponReady;
		Loop;
	Deselect:
		FLMG A 1 A_Lower;
		Loop;
	Select:
		FLMG A 1 A_Raise;
		Loop;
	Fire:
		FLMF A 0 BRIGHT A_Jump(128, "FireAltSound");
		FLMF A 0 BRIGHT A_StartSound("weapons/incinerator/fire1", CHAN_WEAPON);
		Goto DoFire;
	FireAltSound:
		FLMF A 0 BRIGHT A_StartSound("weapons/incinerator/fire2", CHAN_WEAPON);
		Goto DoFire;
	DoFire:
		FLMF A 0 BRIGHT A_GunFlash;
		FLMF A 0 BRIGHT MBF21_ConsumeAmmo(1);
		FLMF A 1 BRIGHT MBF21_WeaponProjectile("ID24IncineratorFlame", 0, 0, 0, 0);
		FLMF B 1 BRIGHT;
		FLMG A 1;
		FLMG A 0 A_ReFire;
		Goto Ready;
	Flash:
		TNT1 A 2 A_Light2;
		TNT1 A 1 A_Light1;
		Goto LightDone;
	}
}

class ID24IncineratorFlame : Actor // Incinerator Flame 
{
	Default
	{
		Damage 5;
		Speed 40;
		Radius 13;
		Height 8;

		Projectile;
		+ZDOOMTRANS;
		+FORCERADIUSDMG;
		RenderStyle "Add";
		Decal "Scorch";
	}

	States
	{
	Spawn:
		TNT1 A 1 BRIGHT;
		IFLM A 2 BRIGHT;
		IFLM B 2 BRIGHT A_StartSound("weapons/incinerator/burn", CHAN_BODY);
		IFLM CDEFGH 2 BRIGHT;
		Stop;
	Death:
		IFLM A 0 BRIGHT A_Jump(128, "DeathSoundAlt");
		IFLM A 0 BRIGHT A_StartSound("weapons/incinerator/hot1", CHAN_BODY);
		Goto DeathExplosion;
	DeathSoundAlt:
		IFLM A 0 BRIGHT A_StartSound("weapons/incinerator/hot2", CHAN_BODY);
		Goto DeathExplosion;
	DeathExplosion:
		IFLM I 2 BRIGHT A_RadiusDamage(5, 64);
		IFLM JI 2 BRIGHT;
		IFLM J 2 BRIGHT A_RadiusDamage(5, 64);
		IFLM KJ 2 BRIGHT;
		IFLM K 2 BRIGHT A_RadiusDamage(5, 64);
		IFLM L 2 BRIGHT;
		IFLM K 2 BRIGHT A_StartSound("weapons/incinerator/hot3", CHAN_BODY);
		IFLM L 2 BRIGHT A_RadiusDamage(5, 64);
		IFLM ML 2 BRIGHT;
		IFLM M 2 BRIGHT A_RadiusDamage(5, 64);
		IFLM NM 2 BRIGHT;
		IFLM N 2 BRIGHT A_RadiusDamage(5, 64);
		IFLM ONO 2 BRIGHT;
		IFLM POP 2 BRIGHT;
		Stop;
	}
}