by cypherphage » Tue May 08, 2012 10:27 pm
Muwhaha, I figured out a way to do this!
Code: Select all
Actor superFlask : CustomInventory
{
+INVENTORY.HUBPOWER
+INVENTORY.ALWAYSPICKUP
+INVENTORY.AUTOACTIVATE
+INVENTORY.INVBAR
INVENTORY.MaxAmount 100
states { Spawn:
PTN2 ABC 4
loop
use:
TNT1 A 0 A_GiveInventory ("doubleFlask", 1)
stop
}}
Actor doubleFlask : CustomInventory
{ +INVENTORY.ALWAYSPICKUP
states {
Pickup:
TNT1 A 0 A_GiveInventory ("ArtiPoisonBag", 1)
TNT1 A 0 A_GiveInventory ("ArtiHealth", 1)
TNT1 A 0 A_TakeInventory ("superFlask", 1)
TNT1 A 0 a_jumpifinventory("superFlask",1,"pickup")
stop }}
// try giving yourself this, you'll now get 10 of both items meaning this works
Actor superFlaskTest : CustomInventory
{states { Spawn:
PTN2 ABC 4
loop
pickup:
TNT1 A 0 A_GiveInventory ("superFlask", 10)
stop
}}
this both allows for the giving of a bunch of stuff at once, and also allows for the awesome sauce that is a looped custominvnetory function. For instance, if you wanted to do some complex action 3 times, give three custominventories set up this way...which is sort of horribly ugly hack but is IMO cool beyond words

.
Muwhaha, I figured out a way to do this!
[code]
Actor superFlask : CustomInventory
{
+INVENTORY.HUBPOWER
+INVENTORY.ALWAYSPICKUP
+INVENTORY.AUTOACTIVATE
+INVENTORY.INVBAR
INVENTORY.MaxAmount 100
states { Spawn:
PTN2 ABC 4
loop
use:
TNT1 A 0 A_GiveInventory ("doubleFlask", 1)
stop
}}
Actor doubleFlask : CustomInventory
{ +INVENTORY.ALWAYSPICKUP
states {
Pickup:
TNT1 A 0 A_GiveInventory ("ArtiPoisonBag", 1)
TNT1 A 0 A_GiveInventory ("ArtiHealth", 1)
TNT1 A 0 A_TakeInventory ("superFlask", 1)
TNT1 A 0 a_jumpifinventory("superFlask",1,"pickup")
stop }}
// try giving yourself this, you'll now get 10 of both items meaning this works
Actor superFlaskTest : CustomInventory
{states { Spawn:
PTN2 ABC 4
loop
pickup:
TNT1 A 0 A_GiveInventory ("superFlask", 10)
stop
}}
[/code]
this both allows for the giving of a bunch of stuff at once, and also allows for the awesome sauce that is a looped custominvnetory function. For instance, if you wanted to do some complex action 3 times, give three custominventories set up this way...which is sort of horribly ugly hack but is IMO cool beyond words :).