SetSectorDamage: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "{{ACSFunction |description=Modifies a sector's damaging floor status. |usage=''void'' '''SetSectorDamage'''(''int tag'', ''int amount'', ''str damagetype = "Unknown"'', ''int...")
 
No edit summary
 
Line 20: Line 20:
|id=-94
|id=-94
|seealso=
|seealso=
*[[ChangeCeiling]]
*[[ChangeFloor]]
*[[SectorDamage]]
*[[SectorDamage]]
}}
}}

Latest revision as of 04:28, 2 January 2022

Description[edit]

This is an ACS built-in function.

Modifies a sector's damaging floor status.

Usage[edit]

void SetSectorDamage(int tag, int amount, str damagetype = "Unknown", int interval = 32, int leaky = 0)

Parameters[edit]

Return value[edit]

None.

Examples[edit]

This causes sectors tagged 1 to damage like the classic Doom lava:

SetSectorDamage(1, 20, "Lava", 32, 5);

This one clears all the damaging properties:

SetSectorDamage(1, 0);

Notes[edit]

This function strictly sets or clears the damaging floor status of a sector, which can only affect players, not monsters or other destructibles.

It doesn't offer other possibilities, such as changing the damageflags (as in ExtraData), so you can't for example enable lava that also produces terrain hits on damage, as in Heretic, if it wasn't this way before. For that, you can still use the "change floor texture and type" linedef specials.

This function's identification in zspecial.acs is: -94.

See also[edit]