Difference between revisions of "ON CONDITION"

From 3DGE Wiki
Jump to: navigation, search
(Created page with "Usage: ON_CONDITION <condition> Description: Use this to activate a line trigger only when a specified condition has been met. It works in a similar manner to ON_DEATH and ON...")
 
m
Line 9: Line 9:
  
 
HEALTH(num)
 
HEALTH(num)
 +
 
ARMOUR(num)
 
ARMOUR(num)
 +
 
BULLETS(num) -- and other ammo types
 
BULLETS(num) -- and other ammo types
 +
 
GREEN_ARMOUR(num) -- and other armour types
 
GREEN_ARMOUR(num) -- and other armour types
 +
 
KEY_BLUECARD -- and the other keys
 
KEY_BLUECARD -- and the other keys
 +
 
CHAINGUN -- and other weapons
 
CHAINGUN -- and other weapons
POWERUP_PARTINVIS(num) -- and other powerups
+
 
or it is something the player is doing:
+
POWERUP_PARTINVIS(num) -- and other powerups or it is something the player is doing:
 +
 
 
WALKING
 
WALKING
 +
 
SWIMMING
 
SWIMMING
 +
 
JUMPING
 
JUMPING
 +
 
CROUCHING
 
CROUCHING
 +
 
ATTACKING
 
ATTACKING
 +
 
RAMPAGING
 
RAMPAGING
 +
 
USING
 
USING
 +
 
For health, ammo, armour and powerup conditions, the value (in brackets) is optional. When present it is the minimum needed to activate the trigger. For example: HEALTH(50) requires health 50 or higher to run. Without a value, the trigger activates with "any value above zero".
 
For health, ammo, armour and powerup conditions, the value (in brackets) is optional. When present it is the minimum needed to activate the trigger. For example: HEALTH(50) requires health 50 or higher to run. Without a value, the trigger activates with "any value above zero".
  

Revision as of 15:22, 24 July 2016

Usage: ON_CONDITION <condition>

Description: Use this to activate a line trigger only when a specified condition has been met. It works in a similar manner to ON_DEATH and ON_HEIGHT.

Details: <Condition> is either something that the player is holding:

HEALTH(num)

ARMOUR(num)

BULLETS(num) -- and other ammo types

GREEN_ARMOUR(num) -- and other armour types

KEY_BLUECARD -- and the other keys

CHAINGUN -- and other weapons

POWERUP_PARTINVIS(num) -- and other powerups or it is something the player is doing:

WALKING

SWIMMING

JUMPING

CROUCHING

ATTACKING

RAMPAGING

USING

For health, ammo, armour and powerup conditions, the value (in brackets) is optional. When present it is the minimum needed to activate the trigger. For example: HEALTH(50) requires health 50 or higher to run. Without a value, the trigger activates with "any value above zero".

Any condition can be prefixed with "NOT_", which negates the condition, e.g. NOT_KEY_REDSKULL means that the trigger will only run when the player doesn't have the red skull key. This also works with values, for example: NOT_HEALTH(50) requires health below 50 to run.

Multiple ON_CONDITION lines can be used in each trigger script, and they all have to be satisfied before the trigger will run.

Example: This radius trigger script checks to see if the player has too much armour for a certain map.