ON_CONDITION
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
- 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.
RADIUS_TRIGGER 0 0 -1 // only runs if player has 200% blue armour ON_CONDITION BLUE_ARMOUR(200) TIP "I think you used IDKFA!" WAIT 3 TIP "Goodbye cheater!" DAMAGE_PLAYER 1000 END_RADIUS_TRIGGER