[Question] Random Damage Value for PoisonDamage?

Archive of the old editing forum
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.
Locked
User avatar
RV-007
Posts: 1501
Joined: Fri Sep 02, 2011 9:00 pm
Location: Dying w/ civilization or living after it
Contact:

[Question] Random Damage Value for PoisonDamage?

Post by RV-007 »

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
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: [Question] Random Damage Value for PoisonDamage?

Post by ChronoSeth »

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.
User avatar
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?

Post by RV-007 »

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:
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: [Question] Random Damage Value for PoisonDamage?

Post by amv2k9 »

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.
User avatar
ChronoSeth
Posts: 1631
Joined: Mon Jul 05, 2010 2:04 pm
Location: British Columbia

Re: [Question] Random Damage Value for PoisonDamage?

Post by ChronoSeth »

5(1,3) isn't a valid operation...

Are you meaning to use 5*random(1,3)?
User avatar
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?

Post by NeuralStunner »

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.
That's a special case for the Damage property.

I even checked with the guy who wrote the PoisonDamage extension:
<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...
... You could randomize it through ACS, at least for projectiles.
User avatar
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?

Post by RV-007 »

At least I got my answers. I guess I'll learn ACS soon.
Locked

Return to “Editing (Archive)”