GLOBALS

commands

Also known as: GLOBAL-VARIABLES · GLOBAL-VARS · GVARS · TRIGEDIT-GLOBALS · TRIG-GLOBALS

Usage: global <variablename> Global variables allow a room/mob/obj trigger variable to be used by another trigger on the same room/mob/obj. i.e. a bribe trigger could global that the mob has_been_bribed then when a player tries to leave the mobs leave trigger would check the global variable to allow or prevent passage accordingly. * To make a variable 'reachable' from other triggers it has to be made 'global'. * In this case I make a local known var %has_bribed_guard% and make it global. * It is a good idea to use this in conjunction with context. set has_bribed_guard 1 global has_bribed_guard Globals can be checked by varexists: if %actor.varexists(<variable>)% Global variables should not be used when you want to remember something about a player. To save something to a players file for future use always use REMOTE. Examples: TSTAT 23612, 23613, 23614 See also:: REMOTE, VARIABLES, CONTEXT