SetSectorDamage

From Eternity Wiki
Revision as of 04:28, 2 January 2022 by Printz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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]