Why doesnt this weapon work?
Posted: Mon Jan 07, 2013 10:10 am
I wanted to try to make something no has made before or atleast that I know of, and It just wont work... Take note that its 2:10AM and It might be just because of sleep but I still want to see if I can get help (Its also not all 0's just because...).
Code: Select all
ACTOR Breifcase : Weapon
{
Obituary "%o was bludgened by %k's Breifcase."
Inventory.Pickupmessage "Picked up a Breifcase."
Tag "Breifcase"
+WEAPON.MELEEWEAPON
States
{
Ready:
TNT1 A 1 A_WeaponReady
Loop
Deselect:
TNT1 A 1 A_Lower
Loop
Select:
TNT1 A 1 A_Raise
Loop
Fire:
TNT1 A 4
TNT1 A 4 A_Punch
TNT1 A 5
TNT1 A 4
TNT1 A 5 A_ReFire
Goto Ready
AltFire:
TNT1 A 0 A_JumpIfInventory("ItemsTaken",1,"GiveWeapons")
TNT1 A 0 A_JumpIfInventory("ItemsTaken",0,"TakeWeapons")
Goto Error
TakeWeapons:
TNT1 A 1 A_JumpIfInventory("Chainsaw",0,3)
TNT1 A 1 A_GiveInventory("ChainsawEgg")
TNT1 A 1 A_TakeInventory("Chainsaw")
TNT1 A 1 A_JumpIfInventory("Pistol",0,3)
TNT1 A 1 A_GiveInventory("PistolEgg")
TNT1 A 1 A_TakeInventory("Pistol")
TNT1 A 8 A_Print("Items Taken")
TNT1 A 1 A_GiveInventory("ItemsTaken")
Goto Ready
GiveWeapons:
TNT1 A 1 A_JumpIfInventory("ChainsawEgg",0,3)
TNT1 A 1 A_GiveInventory("Chainsaw")
TNT1 A 1 A_TakeInventory("ChainsawEgg")
TNT1 A 1 A_JumpIfInventory("PistolEgg",0,3)
TNT1 A 1 A_GiveInventory("Pistol")
TNT1 A 1 A_TakeInventory("PistolEgg")
TNT1 A 8 A_Print("Items Given")
TNT1 A 1 A_TakeInventory("ItemsTaken")
Goto Ready
Error:
TNT1 A 8 A_Print("How the fuck are you seeing this?!")
Goto Ready
Spawn:
CSAW A -1
Stop
}
}
ACTOR ChainsawEgg : CustomInventory
{
+COUNTITEM
-INVENTORY.INVBAR
Inventory.Icon "TNT1A0"
Inventory.PickupMessage ""
Inventory.DefMaxAmount
Tag ""
States
{
Spawn:
TNT1 A 1
Loop
}
}
ACTOR PistolEgg : CustomInventory
{
+COUNTITEM
-INVENTORY.INVBAR
Inventory.Icon "TNT1A0"
Inventory.PickupMessage ""
Inventory.DefMaxAmount
Tag ""
States
{
Spawn:
TNT1 A 1
Loop
}
}
ACTOR ItemsTaken : CustomInventory
{
+COUNTITEM
-INVENTORY.INVBAR
Inventory.Icon "TNT1A0"
Inventory.PickupMessage ""
Inventory.DefMaxAmount
Tag ""
States
{
Spawn:
TNT1 A 1
Loop
}
}