Hi.
How to rolong poison suit protection?
Does "health" work this way?
How to prolong poison suit protection?
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
- Kappes Buur
-
- Posts: 4122
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: How to prolong poison suit protection?
See https://zdoom.org/wiki/Actor_properties ... p.Duration
You will have to create a new powerup actor, which could inherit
from the Radsuit for simplicity of coding.
You will have to create a new powerup actor, which could inherit
from the Radsuit for simplicity of coding.
-
- Posts: 103
- Joined: Wed Jan 22, 2020 5:04 am
Re: How to prolong poison suit protection?
Those articles are too FRAGMENTED and too complicated for me. They do not explain explicitly how to do this.
Can anyone explain it in simple words?
Can anyone explain it in simple words?
Re: How to prolong poison suit protection?
You need to create a new actor and inherit from the radiation suit, and modify its powerup duration.
Actor SuperRadSuit : RadSuit 999
{
//$Category Powerups
//$Title Super Radiation Suit
Powerup.Duration -120
}
Powerup.Duration length can be a positive value, in which it will be in tics (1/35 second), or a negative value, in which it will be in seconds. The other two properties categorize and name it so you can find it in Doom Builder, and the number at the top is its DoomEdNum which is used to search for it in Edit Thing. Those three things can be anything you want, as long as it isn't already in use.
Actor SuperRadSuit : RadSuit 999
{
//$Category Powerups
//$Title Super Radiation Suit
Powerup.Duration -120
}
Powerup.Duration length can be a positive value, in which it will be in tics (1/35 second), or a negative value, in which it will be in seconds. The other two properties categorize and name it so you can find it in Doom Builder, and the number at the top is its DoomEdNum which is used to search for it in Edit Thing. Those three things can be anything you want, as long as it isn't already in use.
Re: How to prolong poison suit protection?
Also you can give it +INVENTORY.ADDITIVETIME so that when you pick sveral at once, their time is added instead of merely resetting the counter.