User Tools

Site Tools


xg:activation_requirement

Activation requirements (XG)

An Line Type can specify several requirements that must be met for the activation or deactivation of the line to succeed. These include for instance 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.

Requirements

To set the requirements for activation and deactivation within a Line Type definition, use the Flags property of the definition.

Flags = flaga | flagb | flagc

Example:

Flags = mobj_gone | activator_type

mobj_gone

The line will only be activated if there are no THINGS of a certain type with health > 0 at the time of testing. Thing type is specified using the Thing type flag eg:

Thing type = POSSESSED

no_other_use_secret

Only players can activate this line if it's marked as secret.

activator_type

The line can only be activated by THINGS of a certain type. Thing type is specified using the Thing type flag eg:

Thing type = POSSESSED

Extended requirements

To set the extended requirements for (De)activation within an Line Class definition use Flags2 eg:

Flags2 = flaga | flagb | flagc etc

Example:

Flags2 = key1 | health_above

when_act

The function of the line is executed when the line changes state from inactive to active, i.e. it's activated.

when_deact

The function of the line is executed when the line changes state from active to inactive, i.e. it's deactivated.

when_last

The function of the line can only be executed when the line's counter changes to one (1) from another value. Otherwise the function won't be processed at all.

while_act

The function of the line is executed repeatedly while the line is active. Controlled with “Ticker start time”, “Ticker end time” and “Ticker tics”.

while_inact

The function of the line is executed repeatedly while the line is inactive. Controlled with “Ticker start time”, “Ticker end time” and “Ticker tics”.

key_1

The activator must be a player who has key 1 (Doom: blue keycard, Heretic: yellow key). If the player doesn't have the key the message “You need a [key].” will be shown.

key_2

The activator must be a player who has key 2 (Doom: yellow keycard, Heretic: green key). If the player doesn't have the key the message “You need a [key].” will be shown.

key_3

The activator must be a player who has key 3 (Doom: red keycard, Heretic: blue key). If the player doesn't have the key the message “You need a [key].” will be shown.

key_4

The activator must be a player who has key 4 (Doom: blue skull key, Heretic: not used). If the player doesn't have the key the message “You need a [key].” will be shown.

key_5

The activator must be a player who has key 5 (Doom: yellow skull key, Heretic: not used). If the player doesn't have the key the message “You need a [key].” will be shown.

key_6

The activator must be a player who has key 6 (Doom: red skull key, Heretic: not used). If the player doesn't have the key the message “You need a [key].” will be shown.

line_act

All the lines referenced with must be active or the event-based activation and deactivation of the line will fail. An example would be a door that is unlocked by a remote switch. The lines to check are specified with “Line act lref” (Ap4) using a lref and “Line act lrefd” (Ap5) eg:

Line act lref = lref_line_tagged

line_inact

All the lines referenced with must be inactive or the event-based activation and deactivation of the line will fail. An example would be a door that is unlocked by a remote switch. The lines to check are specified with “Line inact lref” (Ap6) using a lref and “Line inact lrefd” (Ap7) eg:

Line inact lref = lref_tagged
   Line inact lrefd = 8

color

The activator of the line must be of the color specified or the activation and deactivation of the line will fail. The activator color is specified with Color (Ap8) eg:

Color = 1

health_above

Health of the line's activator must be above the value specified or the activation and deactivation of the line will fail. Health below limit is set with Health above (Ap0) eg:

Health above = 100

health_bellow

Health of the line's activator must be below the value specified or the activation and deactivation of the line will fail. Health below limit is set with Health below (Ap1) eg:

Health below = 100

power_above

The line's activator must be a player whose armor level is above the value specified or the activation and deactivation of the line will fail. Power below limit is set with Power above (Ap2) eg:

Power above = 20

power_below

The line's activator must be a player whose armor level is below the value specified or the activation and deactivation of the line will fail. Power below limit is set with Power below (Ap3) eg:

Power below = 80

single_player

The line can be activated and deactivated in single-player games.

cooperative

The line can be activated and deactivated in co-operative multiplayer games.

deathmatch

The line can be activated and deactivated in deathmatch multiplayer games.

any_mode

(singleplayer, cooperative and deathmatch combined). The line can be activated and deactivated regardless of game mode.

easy

The line can be activated and deactivated in easy skill levels (1 and 2).

med

The line can be activated and deactivated in the medium skill level (3).

hard

The line can be activated and deactivated in hard skill levels (4 and 5).

any_skill

(easy, med and hard combined). The line can be activated and deactivated regardless of the skill level.

any

(any_mode and any_skill combined). The line can be activated and deactivated regardless of game mode or skill level.

xg/activation_requirement.txt · Last modified: 2017-03-17 07:58 by skyjake