Sector_SetDamage

From ZDoom Wiki
Jump to navigation Jump to search

214:Sector_SetDamage (tag, amount, mod, interval,leaky)


  • tag: Tag of affected sector
  • amount: Amount of damage to apply
  • mod: Means-of-death identifier; see the "means of death" column on the damage types for a full list.
    • 0 = MOD_UNKNOWN
    • 12 = MOD_WATER
    • 13 = MOD_SLIME
    • 14 = MOD_LAVA
    • 15 = MOD_CRUSH
    • 16 = MOD_TELEFRAG
    • 17 = MOD_FALLING
    • 18 = MOD_SUICIDE
    • 19 = MOD_BARREL
    • 20 = MOD_EXIT
    • 21 = MOD_SPLASH
    • 22 = MOD_HIT
    • 23 = MOD_RAILGUN
    • 24 = MOD_ICE (ala Hexen)
    • 25 = MOD_DISINTEGRATE (ala Strife's Mauler)
    • 26 = MOD_POISON
    • 27 = MOD_ELECTRIC
    • 1000 = Massacre (no constant)
  • interval: Time between two inflictions of damage in tics.
  • leaky: Probability of a radiation suit 'leaking' damage, 0 meaning it doesn't leak. 256 means the radiation suit has no effect at all. Doom's 20% damage sector type uses a value of 5.

Sets the amount of damage done to a player in a sector. Damage settings from regular Doom sector types or UDMF map settings will be overridden by this.

If 'interval' is set to 0, the defaults of older versions will be used: Damage amount below 20 will never hurt the player if he has an environment suit. Damages between 20-49 will occasionally hurt the player even with an environment suit on. Damages of 50 and above will always hurt the player unless he is invulnerable.

There are some newer built-in damage types for which no MOD code exists and custom damage types are identified by names; neither can be used with this special. If you want to attach this special outside a script (e.g., to a line or a thing) but need to use a damage type that is recognized by the game by name, but is not listed above, set the line/thing special to run a script instead and use the SectorDamage or SetSectorDamage ACS function in the script.