Code: Select all
ACTOR AEoDFPhoenixRod : Weapon 6014
{
+FLOORCLIP
Weapon.AmmoType "RocketAmmo"
Weapon.AmmoType2 "RocketAmmo"
Weapon.AmmoGive 18
Weapon.AmmoUse 1
Weapon.AmmoUse2 1
Inventory.PickupSound "weaponbuild"
Inventory.PickupMessage "Picked up the Phoenix rod."
Obituary "%o saw a fire bird rising from %k's Rod."
AttackSound "weapons/pistol"
States
{
Spawn:
WPHX A -1
Loop
Ready:
TNT1 A 0 A_TakeInventory("PhoenixAltFCheck",8)
PHNX A 1 A_WeaponReady
Loop
Deselect:
TNT1 A 0 A_TakeInventory("PhoenixAltFCheck",8)
PHNX A 1 A_Lower
NULL AA 0 A_Lower
Goto Deselect+1
Select:
TNT1 A 0 A_TakeInventory("PhoenixAltFCheck",8)
PHNX A 1 A_Raise
NULL AA 0 A_Raise
Goto Select+1
Fire:
PHNX B 0 A_PlayWeaponSound("weapons/phoenixshoot")
PHNX B 8 Bright
PHNX C 0 A_GunFlash
DPIS A 0 A_Recoil(6)
PHNX C 7 Bright A_FireCustomMissile("PhoenixShot", 0, 1, 0, 0)
PHNX D 8 Bright
goto Ready
AltFire:
PHNX B 3 Bright
PHNX C 1 Bright A_FireCustomMissile("PhoenixFX2", 0, 1, 0, 0) //only the start is what consumes ammo
PHNX C 1 Bright A_FireCustomMissile("PhoenixFX2", 0, 0, 0, 0)
TNT1 A 0 A_Refire
TNT1 A 0 A_TakeInventory("PhoenixAltFCheck",8)
PHNX D 3 Bright
goto Ready
AltHold:
TNT1 A 0 A_JumpIfInventory("PhoenixAltFCheck",8,"HoldEnd")
TNT1 A 0 A_GiveInventory("PhoenixAltFCheck",1)
PHNX C 1 Bright A_FireCustomMissile("PhoenixFX2", 0, 0, 0, 0)
TNT1 A 0 A_Refire
HoldEnd:
TNT1 A 0 A_TakeInventory("PhoenixAltFCheck",8)
PHNX D 3 Bright
goto Ready
Flash:
CRBW W 3 BRIGHT A_Light1
CRBW W 2 BRIGHT A_Light0
Stop
}
}
actor PhoenixAltFCheck : Inventory
{
Inventory.MaxAmount 8
Inventory.Amount 1
}
After a couple revisions, I understood this is what's happening: Seems like even when it reaches the HoldEnd state, and it is told to go to Ready, if you keep pressing your altfire key, the weapon will go again to the AltHold instead of going to the AltFire (as it should because I told the weapon to "goto ready"). I seriously consider this a Bug, but maybe is intentional behaviour. Anyway, is there a better method to replicate the powered phoenix rod behaviour? or a way to fix this one?
(of course in the final version of this weapon you'll fire more than 8 little flames, i just used that number to count them ingame)
Thanks in advance.