Code: Select all
Actor CXBackpack : CustomInventory
{
+CountItem
+Inventory.AlwaysPickup
Height 26
Inventory.PickupMessage "$GOTBACKPACK" // "Picked up a backpack!"
States
{
Spawn:
BPAK A -1
Loop
Pickup:
TNT1 A 0 A_JumpIfInTargetInventory("CXRocketLauncher", 1, "PackRG")
TNT1 A 0 A_JumpIfInTargetInventory("Pistol", 1, "PackMG")
PackRG:
TNT1 A 0 A_GiveInventory("CXMinigun")
TNT1 A 0 A_GiveInventory("CXGrenadeAmmo", 2)
Stop
PackMG:
TNT1 A 0 A_GiveInventory("Shotgun")
TNT1 A 0 A_GiveInventory("Shell",8)
TNT1 A 0 A_GiveInventory("CXGrenadeAmmo", 2)
Stop
}
}