SetChar 

Usage:
/SetChar (options) variable "value"

Description:
       This command will set any string variable to a value. Note that the value MUST be enclosed in quotes if there is more than one word. Good practice is to enclose it in quotes anyways. If the ring is set to "arg", the variable is stored to this current argument list. It will only last the duration of this command, and can be accessed like any argument. $(aLastWeapon) in example.

Option:

Option Range Default Description
ring primary, secondary, server, game, or arg primary Specifies the target keyring for this addition. Primary and secondary refer to player keys for the current event or command.

Example:


/SetChar Example

# This will create an event that sets a game variable named title to
# a string whenever someone hits 50 enemy kills. You could access this
# variable by using $(g@title)

on a_k.e {
  equal 50;
  cmd /SetChar (ring=game) title "The coolest game in history";
};

# This creates an argument named 'ThisWeapon' with the value
# of the weapon used in this kill. There really is no point
# to this example but to show syntax.

on a_k.e cmd {
  /SetChar (ring=arg) ThisWeapon "$(pv)";
  /say_stat * $(pn) just killed with $(a@ThisWeapon);
};