The thing is, the rocketbox created by the spawner CAN be picked up but gives NO AMMO.
However, if you spawn them using summon, they CAN'T be picked up, but they are THE SAME CLASS.
But the homing ones work very well.
That's REALLY weird.
Code: Select all
Actor NewRocketAmmo :Rocketammo
{
Inventory.PickupMessage "$GOTROCKET"
Inventory.Amount 1
Inventory.MaxAmount 50
Ammo.BackpackAmount 1
Ammo.BackpackMaxAmount 100
Inventory.Icon "ROCKA0"
States
{
Spawn:
ROCK A -1
stop
}
}
Actor NewRocketBox :NewRocketAmmo
{
Inventory.PickupMessage "$GOTROCKBOX" // "Picked up a box of rockets."
Inventory.Amount 5
States
{
Spawn:
BROK A -1
Stop
}
}
Actor HomingAmmo : Ammo
{
inventory.maxamount 25
inventory.pickupmessage "Picked up a homing rocket"
inventory.icon "HOCKA0"
inventory.Amount 1
Ammo.BackpackAmount 2
Ammo.BackpackMaxAmount 30
States
{
Spawn:
HOCK A -1
stop
}
}
Actor Homingbox : HomingAmmo
{
inventory.PickupMessage "Got a Homing rocket box."
Inventory.amount 5
states
{
Spawn:
HROK A -1
stop
}
}
Actor Rocketspawner: RandomSpawner replaces RocketAmmo
{
DropItem "NewRocketAmmo"
DropItem "HomingAmmo"
}
Actor RocketBoxSpawner : RandomSpawner replaces Rocketbox
{
DropItem "NewRocketBox"
DropItem "HomingBox"
}
I made a realoding shotgun with casings, it works PERFECTLY, but it STILL can reload if you don't have any shells. If you don't have any, it SHOULD jump to the WTFNOWAY state:
but it doesn't.
Code: Select all
Actor ImpHunter1 : Weapon
{
Weapon.SelectionOrder 1300
Weapon.AmmoUse1 1
Weapon.AmmoGive1 0
Weapon.ammogive2 10
Weapon.AmmoType "MK1ShellsLoaded"
Weapon.AmmoType2 "Shell"
Inventory.PickupMessage "Got the Imp Hunter Mk1!"
Obituary "%o ate too much of %k's pellets."
States
{
Ready:
SGN2 A 1 A_WeaponReady
Loop
Deselect:
SGN2 A 1 A_Lower
Loop
Select:
SGN2 A 1 A_Raise
Loop
Fire:
SGN2 A 2 A_JumpIfNoAmmo ("Reload")
SGN2 A 2
SGN2 A 1 A_PlaySound ("IHUFIRE",CHAN_WEAPON)
SG2F A 4 bright A_FireBullets (5.6, 0, 7, 5, "BulletPuff")
SGN2 BC 3
SGN2 D 3 A_PlaySound ("IHUPUMP")
SGN2 DCB 3
SGN2 D 0 A_FireCustomMissile("ShellCasing",-90,0)
SGN2 A 2 A_ReFire
Goto Ready
Spawn:
IMK1 A -1
Stop
AltFire:
Goto Reload
Reload:
SGN2 A 0 A_JumpIfInventory ("MK1ShellsLoaded",4,"Ready")
SGN2 A 0 A_JumpIfInventory ("MK1ShellsLoaded",3,"LoadOneShell")
SGN2 A 0 A_JumpIfInventory ("MK1ShellsLoaded",2,"LoadTwoShell")
SGN2 A 0 A_JumpIfInventory ("MK1ShellsLoaded",1,"LoadThreeShell")
SG2R ABCDE 3
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R DCBA 3
goto ready
LoadOneShell:
SG2R ABCDE 3
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R DCBA 3
goto ready
LoadTwoShell:
SG2R ABCDE 3
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R DCBA 3
goto ready
LoadThreeShell:
SG2R ABCDE 3
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R E 0 A_CheckReload
SG2R E 7 A_PlaySound ("Shelladd")
SG2R E 0 A_TakeInventory ("Shell",1)
SG2R E 0 A_GiveInventory ("MK1ShellsLoaded")
SG2R DCBA 3
goto ready
WTFNOWAY:
SGN2 A 1 A_Print ("You don't have any shells\n left in your inventory!")
goto ready
}
}
Actor MK1ShellsLoaded : Ammo
{
Inventory.MaxAmount 4
}
