[fixed]CustomInventory doesn't add to inventory?
Posted: Sat Mar 18, 2006 1:51
Maybe I'm just doing something wrong, but I've been unable to add one of my CustomInventory items into my inventory. Here it is:
When I give it to myself or summon it, it's just placed on the ground where I stand and I keep running over it and it never enters my inventory. If I walk over it, it just keeps the screen in a constant shade of yellow and keeps printing the pickup message repeatedly as I try to pick it up but can't. 
Code: Select all
ACTOR WeaponUpgrade : CustomInventory
{
// +AUTOACTIVATE
+ALWYASPICKUP
+INVBAR
Inventory.PickupMessage "You shouldn't see this message."
Inventory.Amount 1
Inventory.MaxAmount 10
States
{
Spawn:
TNT1 A -1
Stop
Pickup:
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 1, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 2!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("FullHealth", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 2, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 3!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 3, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 4!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("FullHealth", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 4, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 5!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 5, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 6!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("FullHealth", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 6, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 7!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 7, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 8!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("FullHealth", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 8, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 9!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("HealthUpgrade", 1)
Goto Pickup+36
TNT1 A 1 A_JumpIfInventory("WeaponUpgrade", 9, 4)
TNT1 A 0 A_Print("You gained a level! You are now at level 10!")
TNT1 A 1 A_PlaySound("misc/levelup")
TNT1 A 0 A_GiveInventory("FullHealth", 1)
TNT1 A 1 A_GiveInventory("LevelCounter2", 1)
Stop
}
}
