WHEN APPEAR

From 3DGE Wiki
Jump to: navigation, search

Usage:
WHEN_APPEAR <appear flags>

Description:
Controls when triggers exist on your map, based on skill level and game mode. It's not required if you want the trigger to exist on every skill and net mode, since that is the default setting for scripts.

Details:
The <appear flags> is a bunch of numbers and/or keywords, which must be separated by the colon (':') character. These values can be:

  • the skill levels which this script will be run on. These are numbers in the range 1 to 5, and there can be multiple skill levels present.

E.g. WHEN_APPEAR 1:2:3:4:5

  • the net mode of the current game. Valid values are:
    • "sp" for Single-Player,
    • "coop" for Co-operative,
    • "dm" for Death-Match.

E.g. WHEN_APPEAR sp:coop:dm

  • you can negate the flags by adding the '!' character to the beginning.

E.g. WHEN_APPEAR !4:5<code> </code>

Example:
This script will only appear and run if we are playing a single player game on skill 1.

RADIUS_TRIGGER 0 0 -1
  WHEN_APPEAR 1:sp

  TIP "You're using a low skill setting!"

END_RADIUS_TRIGGER