Editing SectorDamage

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 6: Line 6:
*''amount'': how much damage to inflict on each thing.
*''amount'': how much damage to inflict on each thing.
*''type'': [[damagetype]] i.e. the kind of attack to inflict on each thing, for purposes such as damage resistance or obituary. Use <code>""</code> for no specific damage type (this is the general default behaviour in Doom).
*''type'': [[damagetype]] i.e. the kind of attack to inflict on each thing, for purposes such as damage resistance or obituary. Use <code>""</code> for no specific damage type (this is the general default behaviour in Doom).
*''protection'': optional name of inventory item (the name of an '''[[EDF_item_effects_and_inventory#artifact|artifact]]''' or '''[[EDF_weapon_reference|weaponinfo]]''' EDF block) or [[EDF_item_effects_and_inventory#powereffect|power-up effect]] (use one of the options of its '''type''' field, e.g. '''PowerIronFeet''') which, if present, will protect players in tagged sectors from taking damage. Use <code>""</code> for no protection.
*''protection'': RESERVED. Must be <code>""</code>, otherwise unpredictable effects will happen with future Eternity versions.
*''flags'': a combination of 0 or more of the following:
*''flags'': a combination of 0 or more of the following:
:*1 or '''DAMAGE_PLAYERS''': if set, it can damage players from sectors.
:*1 or '''DAMAGE_PLAYERS''': if set, it can damage players from sectors.
Line 12: Line 12:
:*4 or '''DAMAGE_IN_AIR''': if set, it can damage things which don't touch the floor. By default they must rest on the floor to take damage.
:*4 or '''DAMAGE_IN_AIR''': if set, it can damage things which don't touch the floor. By default they must rest on the floor to take damage.
:Any other flags are reserved and must be avoided, because the behaviour may change in future Eternity versions.
:Any other flags are reserved and must be avoided, because the behaviour may change in future Eternity versions.
|examples=
This will apply 15% damage to all players in sector(s) tagged 1, if they're not wearing a radiation suit, regardless if they're touching the floor or not. If any of them dies, they get the slime/nukage obituary:
SectorDamage(1, 15, "Slime", "PowerIronFeet", DAMAGE_PLAYERS <nowiki>|</nowiki> DAMAGE_IN_AIR);
Other usable ''protection'' examples: <code>"Shotgun"</code> ('''[[weaponinfo]]''') or <code>"RedSkull"</code> ('''[[EDF_item_effects_and_inventory#artifact|artifact]]''').
This applies damage to everyone, with a default "died" obituary in case of death, and no protection:
SectorDamage(1, 35, "", "", DAMAGE_PLAYERS <nowiki>|</nowiki> DAMAGE_NONPLAYERS <nowiki>|</nowiki> DAMAGE_IN_AIR);
|notes=
|notes=
You need to set ''flags'' to at least '''DAMAGE_PLAYERS''' or '''DAMAGE_NONPLAYERS''', otherwise this function will have no effect.
You need to set ''flags'' to at least '''DAMAGE_PLAYERS''' or '''DAMAGE_NONPLAYERS''', otherwise this function will have no effect.


Beware that this will not damage things [[Thing type flags|flagged]] '''NOSECTOR'''. Use the '''DONTDRAW''' [[Thing type flags|thing type flag]] if you want such invisible things to be harmed by '''SectorDamage'''.
Beware that this will not damage things [[Thing type flags|flagged]] '''NOSECTOR'''. Use the '''DONTDRAW''' [[Thing type flags|thing type flag]] if you want such invisible things to be harmed by '''SectorDamage'''.
This function only applies immediate damage. It does not turn the tagged sectors into continually damaging areas. For that, use [[SetSectorDamage]], though that will only harm players.
|return=None.
|return=None.
|id=ACC internal
|id=ACC internal
|seealso=
|seealso=
*[[SetSectorDamage]]}}
*[[SetSectorDamage]]}}
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)

Template used on this page: