I know that the Damage has its own random formula, but how come PoisonDamage doesn't have it's own random formula? If it's 5, then it's the absolute 5 value regardless for the need for damage variation.
http://zdoom.org/wiki/Actor_properties#Damage
[Question] Random Damage Value for PoisonDamage?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- ChronoSeth
- Posts: 1631
- Joined: Mon Jul 05, 2010 2:04 pm
- Location: British Columbia
Re: [Question] Random Damage Value for PoisonDamage?
Damage is inherently randomized in all of the doom-engine games. Poison damage is only featured in Hexen, where it is not randomized. The randomization on normal projectile damage can be removed/overridden by putting the number/formula in brackets.
AFAIK, you can use something like PoisonDamage (random(1,5)) to get randomized damage.
AFAIK, you can use something like PoisonDamage (random(1,5)) to get randomized damage.
- RV-007
- Posts: 1501
- Joined: Fri Sep 02, 2011 9:00 pm
- Location: Dying w/ civilization or living after it
- Contact:
Re: [Question] Random Damage Value for PoisonDamage?
I just did some lazy tests, but all I got was illegal errors from the zdoom library. Here is my code to attempt random poison damage w/ zdoom v2.5.0.
Spoiler:
Re: [Question] Random Damage Value for PoisonDamage?
Try enclosing the whole damage formula within parenthesis. That's what it says to do for the Damage property when making your own custom formulas.
- ChronoSeth
- Posts: 1631
- Joined: Mon Jul 05, 2010 2:04 pm
- Location: British Columbia
Re: [Question] Random Damage Value for PoisonDamage?
5(1,3) isn't a valid operation...
Are you meaning to use 5*random(1,3)?
Are you meaning to use 5*random(1,3)?
- NeuralStunner
-

- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [Question] Random Damage Value for PoisonDamage?
That's a special case for the Damage property.amv2k9 wrote:Try enclosing the whole damage formula within parenthesis. That's what it says to do for the Damage property when making your own custom formulas.
I even checked with the guy who wrote the PoisonDamage extension:
... You could randomize it through ACS, at least for projectiles.<NeuralStunner> There's a discussion of whether special expressions work with PoisonDamage like they do with Damage.
<NeuralStunner> I'm thinking not... But I'm unsure.
<DavidPH> They do not.
<DavidPH> But it's also not randomized, so if someone exposed it as an APROP...
- RV-007
- Posts: 1501
- Joined: Fri Sep 02, 2011 9:00 pm
- Location: Dying w/ civilization or living after it
- Contact:
Re: [Question] Random Damage Value for PoisonDamage?
At least I got my answers. I guess I'll learn ACS soon.
