//New Centaur Flash by Pr. Gibus
actor CentaurFlashWep : BaseMM8BDMWep 10080
{
//$Category MM8BDM-Weapons
//$Title Centaur Flash
Weapon.AmmoUse 4
Weapon.AmmoGive 48
Weapon.SlotNumber 6
Inventory.Pickupmessage "$PU_CENTAURFLASH"
Obituary "$OB_CENTAURFLASH"
Tag "$TAG_CENTAURFLASH"
weapon.ammotype "CentaurFlashAmmo"
inventory.icon "CENTSI"
States
{
Spawn:
WEA3 G 1
loop
Ready:
CENF A 0 ACS_ExecuteAlways(998,0,51)
CENF A 1 A_WeaponReady
Goto Ready+1
Deselect:
CENF A 0 A_ChangeFlag(CANTSEEK, false)
CENF A 0 A_ChangeFlag(INVISIBLE, false)
CENF A 0 A_SetTranslucent(1.0, 0)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
CENF A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
CENF A 1 A_Raise
Loop
Fire:
CENF A 0 A_JumpIfNoAmmo("NoAmmo")
CENF BC 2
CENF C 0 A_PlaySoundEx("weapon/centaurflash","Weapon")
CENF CCCCCCCCCC 0 A_SpawnItemEx("CentaurFlashFX", 0, 0, 28, 256/12, 0, random2(256/12), random(0, 359))
CENF C 0 A_FireCustomMissile("CentaurFlash",0,1,8,0)
CENF C 0 ACS_ExecuteAlways(976,0)
CENF D 8
CENF D 2 A_SetTranslucent(0.5, 0)
FireLoop:
CENF D 0 A_JumpIfInventory("CentaurFlashAmmo",1,"FireLoopX")
goto FireEnd
FireLoopX:
CENF D 4 A_SetTranslucent(0.0, 0)
TNT1 D 0 A_ChangeFlag(CANTSEEK, true)
TNT1 D 0 A_ChangeFlag(INVISIBLE, true)
TNT1 D 0 A_SetTranslucent(0.0, 0)
CENF D 3 A_TakeInventory("CentaurFlashAmmo",1)
CENF D 1 A_Refire("FireLoop")
FireEnd:
CENF D 0 A_PlaySoundEx("weapon/centauruncloak", "weapon")
CENF D 1
CENF D 1
CENF D 1
CENF D 0 A_ChangeFlag(CANTSEEK, false)
CENF D 0 A_ChangeFlag(INVISIBLE, false)
CENF D 2 A_SetTranslucent(0.2, 0)
CENF D 2 A_SetTranslucent(0.4, 0)
CENF C 2 A_SetTranslucent(0.6, 0)
CENF C 2 A_SetTranslucent(0.8, 0)
CENF B 2 A_SetTranslucent(1.0, 0)
CENF A 13
Goto Ready+1
NoAmmo:
CENF A 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor ScreenFlash : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
+INVENTORY.AUTOACTIVATE
States
{
Pickup:
TNT1 A 1 ACS_ExecuteAlways(976,0)
stop
}
}

actor CentaurFlash
{
-SOLID
+NOGRAVITY
PROJECTILE
+NOINTERACTION
+DONTBLAST
damage 0
radius 1
height 1
damagetype "CentaurFlash"
Obituary "$OB_CENTAURFLASH"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(15,256,0)
stop
}
}

actor CentaurFlashFX
{
+NOINTERACTION
+NOGRAVITY
+CLIENTSIDEONLY
+FORCEXYBILLBOARD
-SOLID
scale 2.5
height 0
radius 0
States
{
Spawn:
TNT1 A 0
CFL5 ABCD 3
stop
}
}

actor CentaurFlashAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 48
+INVENTORY.IGNORESKILL
}