Code: Select all
AltFire:
TNT1 A 0 A_JumpIfInventory("Cell", 0, "NoAmmo")
TNT1 A 0 A_TakeInventory("Cell", 10)
HCGG A 3 A_PlaySound("terminator/hmissile")
TNT1 A 0 A_FireCustomMissile("PlayerHomingMissile")
HCCT AB 4 BRIGHT
Goto Ready
Moderator: GZDoom Developers
Code: Select all
AltFire:
TNT1 A 0 A_JumpIfInventory("Cell", 0, "NoAmmo")
TNT1 A 0 A_TakeInventory("Cell", 10)
HCGG A 3 A_PlaySound("terminator/hmissile")
TNT1 A 0 A_FireCustomMissile("PlayerHomingMissile")
HCCT AB 4 BRIGHT
Goto Ready
Code: Select all
AltFire:
TNT1 A 0 A_JumpIfInventory("Cell", 1, 1)
Goto NoAmmo
TNT1 A 0 A_TakeInventory("Cell", 10)
HCGG A 3 A_PlaySound("terminator/hmissile")
TNT1 A 0 A_FireCustomMissile("PlayerHomingMissile")
HCCT AB 4 BRIGHT
Goto Ready
Again, how should i put it then?Arctangent wrote:A_JumpIfInventory with an amount of 0 jumps if you have the max amount of the item, not if you have 0.
yeah yeah... I already fixed it. Thanks!Arctangent wrote:Ichor has an example right there in his post, where instead of going to NoAmmo if you don't have ammo, you go to the rest of the AltFire state if you do have ammo.