Difference between revisions of "ON CONDITION"
(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...") |
(No difference)
|
Revision as of 15:21, 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.