User Tools

Site Tools


xg:line_activation
You were redirected here from xg:activation.

Line activation (XG)

In XG, a line has a state, it is always either active or inactive.

A line can be activated and deactivated in various ways. Activation and deactivation happens according to line events, which occur under specific gameplay circumstances. In most cases, events are triggered by an activator, which is the thing (map object; mobj). Events will activate inactive lines and deactivate active ones.

A line type can specify several activation requirements that must be met for the activation or deactivation of the line to succeed. These include. for instance the event type, a counter (as in “line can be activated N times”), activator type (player, missile, etc.) and any combination of keys possessed by the activator.

Many things can happen when a line is activated or deactivated. The most important one is the execution of the line's class. Other things include showing of messages, playing sounds, changing the texture of the line (handy for switches) and sending chain events.

Activation types

The activation type of a line specifies the basic behavioral type for the line. They are specified using the “Type” parameter e.g:

Type = flip

timed_off

Line can be activated if it's inactive. Once activated, it will remain in that state for a given period of time, after which it will automatically deactivate itself. Line can't be deactivated with events.

timed_on

Line can be deactivated if it's active. Once deactivated, it will remain in that state for a given period of time, after which it will automatically activate itself. Line can't be activated with events (i.e. this is the reverse of lat_timed_off ).

flip

Line can be activated and deactivated with events at any time. There is no automatical time-based activation or deactivation.

flip_timed_off

Line can be activated and deactivated with events at any time. Once activated, the line will deactivate itself after a given period of time.

flip_timed_on

Line can be activated and deactivated with events at any time. Once deactivated, the line will activate itself after a given period of time.

Activation flags

Activation flags modify the behavior of the line to act in various ways. They are specified use the “Flags2” parameter, e.g:

Flags2 = flaga | flagb | flagc etc

Example:

Flags2 = 2sided | group_act

active

The line is initially active. If this flag is not set, the line is inactive after the map has been loaded.

multiple

When the line is activated or deactivated, copy the state of the line to all the lines with a matching tag number. This can be used for instance with doors, if you want that activating one side of the door marks the other side active as well (so the door can't be re-opened while it's already opening).

2sided

The line can be activated and deactivated from both sides. If this flag is not used, only the events that deal with the front side of the line are processed.

group_act

When the line is activated also activate any other lines with a matching Tag.

group_deact

When the line is deactivated also deactivate any other lines with a matching Tag.

override_any

If the line has the boom flag 'Any Trigger', it is ignored by default when testing activation requirements for XG line types. Use this flag to allow the 'Any Trigger' flag to override XG's activator type requirements.

See also

xg/line_activation.txt · Last modified: 2018-10-20 07:48 by skyjake