A Christmas present for ZDoom
Moderator: GZDoom Developers
- DoomRater
- Posts: 8270
- Joined: Wed Jul 28, 2004 8:21 am
- Preferred Pronouns: He/Him
- Location: WATR HQ
- Contact:
Sorry to bump the topic but I think I need clarification. You said the Fail state basically calls itself? Does that mean that when it hits the Fail State it just waits there until the condition is met? Or does it actually cancel? I'm guessing it exits the loop without removing the item, similar to stop.Graf Zahl wrote:I needed some handling for states which jump to themselves anyway so I just used that to signal failure. And to make it more intuitive I added 'FAIL' as a synonym for 'WAIT'.
Now you can do:
and the item will stay.Code: Select all
ACTOR MagicThingy : Inventory { +INVBAR Inventory.MaxAmount 1 states { Spawn: RKEY A 4 BKEY A 4 YKEY A 4 loop Use: RKEY A 1 A_JumpIfInventory("Mana1", 10, 2) RKEY A 1 A_PlaySound("*usefail") Fail RKEY A 1 A_TakeInventory("Mana1", 10) RKEY A 1 HealThing(5) Fail } }
By the way cool inventory item concept.
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
