SetSectorDamage
Description
This is an ACS built-in function.
Modifies a sector's damaging floor status.
Usage
void SetSectorDamage(int tag, int amount, str damagetype = "Unknown", int interval = 32, int leaky = 0)
Parameters
- tag: tag of sectors to modify.
- amount: damage to inflict per interval. Same as UDMF sector damageamount or ExtraData sector damage.
- damagetype: damagetype ("means of death") of the harm, for purposes like obituary or resistance. Same as UDMF sector damagetype or ExtraData sector damagemod.
- interval: period in tics between damages. 32 is the standard Doom time; Heretic uses 16 for lava. Same as UDMF sector damageinterval or ExtraData sector damagemask.
- leaky: chance out of 256 that the damage will breach through radiation suit protection (PowerIronFeet). Doom uses 5 for its classic 20% damaging floors. Same as UDMF sector leakiness (ExtraData only offers LEAKYSUIT and IGNORESUIT).
Return value
None.
Examples
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
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.