Empyre Posted November 5, 2016 I am trying to make an inventory item that can be used an unlimited number of times, but with a cool-down time. Can this be done with DECORATE, and if so, how? I was unable to find the answer in Zoom's wiki. 0 Quote Share this post Link to post
Arctangent Posted November 5, 2016 It's entirely possible. By having a CustomInventory's Use state end in Fail instead of Stop, it isn't consumed. Then you can have it give you a dummy powerup ( something that inherits from PowerStrength is perfect if you're not using A_Punch ) to act as the cooldown, by having an A_JumpIfInventory that checks for that dummy powerup before doing anything else. 0 Quote Share this post Link to post
Empyre Posted November 6, 2016 I thought I had it figured out, but Zandronum fails, giving the following error message:Execution could not continue. Script error, "opweapons2_b1.pk3:pickups.dec" line 37: SC_GetNumber: Bad numeric constant "}". Line 37 is the very last line in this code excerpt.ACTOR PowerGhostLauncherTimer : PowerTargeter { Powerup.Duration 20 -INVENTORY.HUBPOWER States { Targeter: Stop } } ACTOR GhostLauncherTimer : PowerupGiver { Inventory.MaxAmount 0 Powerup.Type "GhostLauncherTimer" +Inventory.AutoActivate } ACTOR GhostLauncher : CustomInventory { Inventory.MaxAmount 1 +Inventory.INVBAR Translation "Ice" RenderStyle "Add" Alpha 0.65 Inventory.Icon "SKULA1" States { Use: TNT1 A 0 A_JumpIfInventory ("GhostLauncherTimer", 1, "NotYet") TNT1 A 0 A_GiveInventory ("GhostLauncherTimer", 1) TNT1 A 0 A_FireCustomMissile("OPGhost1",0,1,0,0,0,0) // Pass-through NotYet: fail } } This is bizarre. Why is it expecting a number there? 0 Quote Share this post Link to post
Edward850 Posted November 6, 2016 I don't what is expected to happen if you jump to "NotYet" when there is no frame defined for it at all. Remember, you can only jump to frames, and 'fail' is not a frame, so that would require A_Jump going to NULL. Or at-least that sure could be the problem. Sure doesn't look like anything else is missing. 0 Quote Share this post Link to post
Empyre Posted November 6, 2016 That was the problem. Now it is working. Thanks! 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.