Terrain Damage on Monsters

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

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.
Post Reply
peewee_RotA
Posts: 364
Joined: Fri Feb 07, 2014 6:45 am

Terrain Damage on Monsters

Post by peewee_RotA »

I've defined a new terrain. It basically causes a little bit of damage over time to "freeze" the player.

I also have some ice monsters in the water. I wanted to make sure they are not getting damaged. So I got ready to make them take 0 ice damage, but before even making that change, I noticed that they never seemed to be hurt at all. I even changed them down to 3 HP to double check if they'd die in 2 cycles and they never took damage.

Do custom damaging terrains affect monsters?

Here's my code:

Code: Select all

splash ColdWaterSplash
{
   smallclass      ColdWaterSplashBase
   smallclip      12
   smallsound      world/drip

   baseclass      ColdWaterSplashBase
   chunkclass      ColdWaterSplash
   chunkxvelshift   8
   chunkyvelshift   8
   chunkzvelshift   8
   chunkbasezvel   2
   sound         FreezeDeath
   noalert
}

terrain ColdWater
{
	splash			ColdWaterSplash
	footclip		10 
	liquid
	damageamount	5
	damagetype		ice
	damagetimemask	23
}

floor CWATER ColdWater
peewee_RotA
Posts: 364
Joined: Fri Feb 07, 2014 6:45 am

Re: Terrain Damage on Monsters

Post by peewee_RotA »

After a lot of testing, they definitely do not damage monsters.

I was able to find 2 references.

This one is in regard to the sector types, not in regard to Terrain with predefined damage. (It's also about default doom behavior, not clones or source port features.)
Damaging floors do not affect monsters.
https://doomwiki.org/wiki/Damaging_floor

This one implies that getting monsters damaged by a sector has a work around. Even though it is only describing actors in the air, it seems to answer the question.
SectorDamage
...It is even possible to use this function to damage monsters and actors not touching the ground, instead of only players with their feet on the ground...
https://zdoom.org/wiki/Damaging_floor#SectorDamage

The confusing part in all this is that monsters that don't fly seem to take take fatal damage from relatively short falls. And a large number of those falls are into a damaging sector, or sector with special behavior (water or ice) making it seem like a non-fatal fall was followed by sector damage.

Anyway, it looks like if a map needs to damage monsters, SectorDamage is the right answer. And any case where they do not need damaged, then they won't take damage from the custom terrain.
Post Reply

Return to “Mapping”