by Spottswoode » Tue Mar 06, 2012 6:12 pm
Just like it says. But for a clearer example
Spoiler:
ACTOR SecondWind : ArtiHealth
{
Game Raven
Game Doom
SpawnID 24
+COUNTITEM
+INVENTORY.PICKUPFLASH
+INVENTORY.FANCYPICKUPSOUND
+Inventory.InvBar
HealthPickup.AutoUse 2
Inventory.MaxAmount 1
Inventory.Icon STIMA0
States
{
Spawn:
STIM A -1
Stop
Use:
TNT1 A 0 A_JumpIfInventory ("FighterSoul", 1, "FighterUse")
TNT1 A 0 A_JumpIfInventory ("MageSoul", 1, "MageUse")
TNT1 A 0 A_JumpIfInventory ("ClericSoul", 1, "ClericUse")
Fail
FighterUse:
TNT1 A 0 A_GiveInventory ("Health", 83)
Stop
ClericUse:
TNT1 A 0 A_GiveInventory("Health", 66)
Stop
MageUse:
TNT1 A 0 A_GiveInventory ("Health", 33)
Stop
}
}
In the above scenario, the item would check for dummy items and heal the player according to the item found in the inventory. This mainly caters to Strife and Raven, but could be used in Doom to impart other effects on death as well. It could be used to give player classes a death throes or heal and teleport the player. The item would only refer to the use state if present, otherwise it would use the Health property to determine its action.
Just like it says. But for a clearer example
[spoiler]ACTOR SecondWind : ArtiHealth
{
Game Raven
Game Doom
SpawnID 24
+COUNTITEM
+INVENTORY.PICKUPFLASH
+INVENTORY.FANCYPICKUPSOUND
+Inventory.InvBar
HealthPickup.AutoUse 2
Inventory.MaxAmount 1
Inventory.Icon STIMA0
States
{
Spawn:
STIM A -1
Stop
Use:
TNT1 A 0 A_JumpIfInventory ("FighterSoul", 1, "FighterUse")
TNT1 A 0 A_JumpIfInventory ("MageSoul", 1, "MageUse")
TNT1 A 0 A_JumpIfInventory ("ClericSoul", 1, "ClericUse")
Fail
FighterUse:
TNT1 A 0 A_GiveInventory ("Health", 83)
Stop
ClericUse:
TNT1 A 0 A_GiveInventory("Health", 66)
Stop
MageUse:
TNT1 A 0 A_GiveInventory ("Health", 33)
Stop
}
}[/spoiler]
In the above scenario, the item would check for dummy items and heal the player according to the item found in the inventory. This mainly caters to Strife and Raven, but could be used in Doom to impart other effects on death as well. It could be used to give player classes a death throes or heal and teleport the player. The item would only refer to the use state if present, otherwise it would use the Health property to determine its action.