Trigger linedef

From SRB2 Wiki
Jump to: navigation, search

A trigger linedef, also known as a linedef executor trigger, is a type of linedef on a control sector that determines when and how a linedef executor will run. In conjunction with the trigger sector, these linedefs will activate the linedef executor, if the conditions that both imply are met.

While the trigger sector normally specifies how many players, and in which position on the sector, the trigger linedefs usually establish how many times the linedef executor can be triggered, and the specific number of certain variables.

Types of trigger linedefs

See also: Linedef types > Linedef executor triggers

Trigger frequency

To determine how often the linedef executor is triggered, there are three variations:

  • Continuous: As long as the player is on the trigger sector, the linedef executor will keep doing running.
  • Each Time: Only triggers one time, but the player is welcome to re-enter the sector to make it trigger again.
  • Once: It will only trigger the first time, and won't trigger again unless the map is reloaded (by dying, for instance).

Trigger conditions

These are the types of trigger linedefs present in SRB2.

Condition Available as Description
None Continuous; Each Time; Once Triggers when the player enters the sector.
# of Pushables Continuous; Once Only triggers when the number of pushable objects (such as gargoyles) determined by the the linedef's length is in the sector.
Character Ability Continuous; Each Time; Once Only triggers when the character's ability number corresponds to the linedef length in multiples of 10.
CTF Blue Team Continuous; Each Time Will only trigger if the player is playing CTF, and on the Blue Team.
CTF Red Team Continuous; Each Time Will only trigger if the player is playing CTF, and on the Red Team.
Level Load Once Does not require a trigger sector, because this is activated on the level's load.
No More Enemies Once If no enemies are present inside an intangible FOF, controlled by a linedef next to this one, it will trigger.
Race Only Once Will trigger if the current gametype is Race.
Ring Count Continuous; Once Only triggers if the player(s)' number of rings is equal, less or greater than the linedef's length.
Trigger After X Calls Continuous; Each Time Must be called a specified number of times before it triggers.
Condition Set Trigger Continuous; Once Only triggers if a certain condition set trigger ID has been activated by a Condition Set Trigger linedef executor.
Unlockable Continuous; Once Only triggers if a certain unlockable has been unlocked.

Additional effects

If the Repeat Midtexture flag of any trigger linedef command in a control sector with several linedef actions is checked, the game goes through the actions in order of their linedef numbers when the linedef is triggered.

See also