SetSectorDamage: Difference between revisions
(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]
- 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[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.