From ZDoom Wiki
Jump to navigation Jump to search

void SetLineActivation (int lineid, int activation [, int repeat])


Sets the line activation flags of the line with the specified ID.


  • lineid: The ID of the line of which to set the activation flags.
  • activation: The activation flags to set. Multiple flags can be set by using the bitwise OR operator (|) between the constant names:
    • SPAC_None — No flags.
    • SPAC_Cross — Activated when crossed by player.
    • SPAC_Use — Activated when used by player.
    • SPAC_MCross — Activated when crossed by monster.
    • SPAC_Impact — Activated when hit by projectile.
    • SPAC_Push — Activated when bumped by player.
    • SPAC_PCross — Activated crossed by projectile.
    • SPAC_UseThrough — Activated when used by player (with pass through).
    • SPAC_AnyCross — Activated by anything crossing it which does not have the TELEPORT.
    • SPAC_MUse — Activated by monsters using it.
    • SPAC_MPush — Activated by monsters bumping into it.
    • SPAC_UseBack — The line can be used from the back side.
  • repeat: Whether the line's assigned action special can be activated multiple times or not.
Value Result
Greater than 0 Can be activated multiple times
Equal to 0 Can only be activated once
Less than 0 No change
Default is -1.


The following line sets the tagged line so it can be activated by bumping into it:

SetLineActivation(1, SPAC_PUSH);

Note that the above line also clears all other activation flags, if any, before setting the new flag. If adding a flag without clearing the ones which are already set is what is desired, then using GetLineActivation is needed:

SetLineActivation(1, GetLineActivation(1) | SPAC_PUSH);

This line clears all activation flags of the tagged line, if any:

SetLineActivation(1, SPAC_NONE);