actor DiveMissileWep : BaseMM8BDMWep 10068
{
//$Category MM8BDM-Weapons
//$Title Dive Missile
//$Sprite WEA2S0
Weapon.AmmoUse 1
Weapon.AmmoGive 28
Weapon.SlotNumber 2
Inventory.Pickupmessage "$PU_DIVEMISSILE"
Obituary "$OB_DIVEMISSILE"
Tag "$TAG_DIVEMISSILE"
weapon.ammotype "DiveMissileAmmo"
inventory.icon "DIVESI"
States
{
SpawnLoop:
WEA2 S -1
loop
Ready:
AIRS D 0 ACS_ExecuteAlways(998,0,38)
AIRS D 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
AIRS D 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
AIRS D 1 A_Raise
Loop
Fire:
AIRS D 0 A_JumpIfNoAmmo("NoAmmo")
AIRS D 0 A_PlaySoundEx("weapon/mbuster","Weapon")
AIRS D 0 A_FireCustomMissile("DiveMissile",0,1,8,0)
AIRS D 0 A_GiveInventory("DiveCounter",23)
AIRS EFD 3
Waiting:
AIRS D 1 A_TakeInventory("DiveCounter",1)
AIRS D 0 A_JumpIfInventory("DiveCounter",1,"Waiting")
AIRS D 4
AIRS D 0 A_Refire
Goto Ready+1
NoAmmo:
AIRS D 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor DiveMissileAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}


actor DiveMissile
{
PROJECTILE
+SEEKERMISSILE
+SCREENSEEKER
-EXTREMEDEATH
Radius 5
Height 5
scale 2.5
damage (12)
damagetype "DiveMissile"
Obituary "$OB_DIVEMISSILE"
speed 35
ReactionTime 85
States
{
Spawn:
DIVE A 0 
DIVE ABAB 1 A_SeekerMissile (2, 10, SMF_LOOK, 256, 10)
NoSeek:
DIVE AB 1 A_SeekerMissile (2, 10, 0, 0, 10)
DIVE A 0 A_CountDown
loop
Crash:
TNT1 A 0 A_TakeFromTarget("DiveCounter",9999)
Death:
TNT1 A 2 A_SpawnItemEx("ExplosionEffect1")
stop
}
}

actor DiveCounter : Inventory
{
inventory.amount 1
inventory.maxamount 23
}