Jump to content
  • 0

is it possible to set powerup time?


forgettable pyromaniac

Question

For example, lowering the shielding suit from 60 to 30, upping invisibility to 50 from 30, or berserk from 122,713,351 seconds to 20 (aka when the red screen disappears).

I'm mostly asking for Berserk, but I'm just wondering if that's a thing I can do in a DeHacked patch or Slade3 or whatev.

Share this post


Link to post

17 answers to this question

Recommended Posts

  • 1

I think if you are using decorate you can use the actor property "Powerup.Duration" to change the time. More info is here:https://zdoom.org/wiki/Actor_properties#Powerup

Quote

Powerup.Duration time

The length of time the power up will last in tics (1/35 of a second). If a negative duration is given, it will be taken as the duration in seconds (e.g., -30 is half a minute, while 30 is less than a second). The maximum duration is 0x7FFFFFFF, which corresponds to about two years of real time and can therefore safely be used for permanent powerups. Note, however, that due to the design of the TimeFreezer powerup, using such a duration value for this powerup is not recommended, as the engine will add two tics to the powerup's duration if the duration's value was even and the powerup was activated on an odd game tic, resulting in a signed overflow error. A value of 0x7FFFFFFD is safe to use in such a case.

 

Edited by Valhen

Share this post


Link to post
  • 0

"Powerup.Duration" if using DECORATE.

 

Not sure about ZScript as I have no knowledge of making ZScript file so I just stick to DECORATE as I know what I'm doing with that.

Share this post


Link to post
  • 0
Just now, Mad Dal 85 said:

"Powerup.Duration" if using DECORATE.

 

Not sure about ZScript as I have no knowledge of making ZScript file so I just stick to DECORATE as I know what I'm doing with that.

yea mostly just dont know where to throw it here.

like do i put it with the Inventory.PickupSound/PickupMessage or like

Share this post


Link to post
  • 0

Here's an example 

 

Powerup.Duration -60

 

This will make the powerup last for a minute.  For 30 seconds, use "-30" after typing "powerup.duration" and it has to be on a separate line in the DECORATE file.

 

 

 

 

Share this post


Link to post
  • 0

Here's a proper example

 

Actor RADSuit : Powerupgiver "insert ED number here"

{

  Height 46

  +inventory.autoactive

  +inventory.alwayspickup

  inventory.maxamount 0

  inventory.pickupmessage "Got the RAD Suit"

  powerup.type "Iron Feet"

  powerup.duration -60

  states 

  {

  Spawn: 

  SUIT A -1 bright 

  Stop 

  } 

 

Hope this helps, mate.

 

 

Edited by Mad Dal 85

Share this post


Link to post
  • 0
19 minutes ago, Mad Dal 85 said:

Here's a proper example

 

Actor RADSuit : Powerupgiver "insert ED number here"

{

  Height 46

  +inventory.autoactive

  +inventory.alwayspickup

  inventory.maxamount 0

  inventory.pickupmessage "Got the RAD Suit"

  powerup.type "Iron Feet"

  powerup.duration -60

  states 

  {

  Spawn: 

  SUIT A -1 bright 

  Stop 

  } 



 

Hope this helps, mate.

 

 

okay, i got it... Kinda working?
I set it to -20 but it stays on permanently, and it doesn't automatically switch to the fist nor heal so idk what's going on tbh.

bruh.png

Share this post


Link to post
  • 0

Everything looks okay to me. Try changing the first line to this 

 

Actor Berserk : CustomInventory 2023

 

See if that fixes it.

 

 

 

Edited by Mad Dal 85

Share this post


Link to post
  • 0
9 minutes ago, Mad Dal 85 said:

Everything looks okay to me. Try changing the first line to this 

 

Actor Berserk : CustomInventory 2023

 

See if that fixes it.

 

 

 

Spoiler

Script error, "leakage.wad:DECORATE" line 6:
"powerup.type" requires an actor of type "PowerupGiver"


Execution could not continue.

Script error, "leakage.wad:DECORATE" line 6:
"powerstrength" is an unknown actor property

So it needs to be PowerupGiver.

Share this post


Link to post
  • 0
1 minute ago, forgettablepyromaniac said:
  Reveal hidden contents

Script error, "leakage.wad:DECORATE" line 6:
"powerup.type" requires an actor of type "PowerupGiver"


Execution could not continue.

Script error, "leakage.wad:DECORATE" line 6:
"powerstrength" is an unknown actor property

So it needs to be PowerupGiver.

No, CustomInventory. The "powerstrength" is a Powerupgiver which is already written in to the original DOOM games. 

Share this post


Link to post
  • 0

If you want, send me the file via DM/PM, I'll take a proper look at it myself on my computer and get it sorted fully for you then send it back to you?

Share this post


Link to post
  • 0

Hey guys. I don't do decorate but best I can see it you need 2 items.

 

One item is a PowerupGiver in which you customize the powerup type and duration to taste.

Other item is the CustomInventory that you already have and can run a sequence of stuff upon pickup.

It will have to do A_GiveInventory("My30SecBerserk") or however you named the custom PowerupGiver instead of PowerStrength which is the "standard" permanent berserk.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...