


Code: Select all
ACTOR AutomaticShotgunGuy : ShotgunGuy Replaces ShotgunGuy
{
AttackSound "weapons/gun"
States
{
Spawn:
SPOS A 0 A_GiveInventory("AutoShotgunGuyMagazine",8)
SPOS AB 10 A_Look
Goto Spawn+1
See:
SPOS A 0 A_ChangeFlag("FRIGHTENED",0)
SPOS AABBCCDD 3 A_Chase
Loop
Missile:
SPOS A 0 A_JumpIfInventory("AutoShotgunGuyMagazine",0,"Reload")
Goto Shoot
Crush:
POL5 A 0 A_NoBlocking
POL5 A -1 A_PlaySound("player/male/gibbed")
Stop
Burn:
NULL A 0 A_NoBlocking
NULL A 1 A_SpawnItemEx("ZombieBurningDeath")
NULL A -1
Stop
Shoot:
SPOS E 11 A_FaceTarget
SPOS F 8 BRIGHT A_SposAttackUseAtkSound
SPOS F 0 A_CustomMissile("ShotgunCasing",45+random(-8,8),2,3)
SPOS E 10 A_TakeInventory("AutoShotgunGuyMagazine",1)
Goto See
Reload:
SPOS A 0 A_ChangeFlag("FRIGHTENED",1)
SPOS A 0 A_JumpIfInventory("AutoShotgunGuyMagazine",8,"See")
SPOS A 0 A_PlaySoundEx("weapons/gunin", "SoundSlot5")
SPOD AA 3 A_Chase
SPOS B 0 A_PlaySoundEx("weapons/gunin", "SoundSlot5")
SPOS BB 3 A_Chase
SPOS C 0 A_PlaySoundEx("weapons/gunin", "SoundSlot5")
SPOS CC 3 A_Chase
SPOS D 0 A_PlaySoundEx("weapons/gunin", "SoundSlot5")
SPOS D 3 A_Chase
SPOS A 0 A_GiveInventory("AutoShotgunGuyMagazine",4)
Goto Reload+1
}
}
ACTOR AutoShotgunGuyMagazine : Inventory
{
Inventory.MaxAmount 8
}