Welcome to the Creatures Wiki! Log in and join the community.

Difference between revisions of "NAME"

From Creatures Wiki
Jump to navigation Jump to search
(c2e caos command)
 
(oops!)
Line 4: Line 4:
 
Syntax: ''NAME varname (anything)''
 
Syntax: ''NAME varname (anything)''
  
This returns the local variable referred to by ''varname''. ''varname'' may be anything at all - integer, string, agent, etc.
+
This returns the target agent variable referred to by ''varname''. ''varname'' may be anything at all - integer, string, agent, etc.
  
NAME variables are the same as [[VAxx]] in their scope.
+
NAME variables are effectively named [[OV''xx''|OVxx]] variables.
  
 
==Examples==
 
==Examples==
Line 19: Line 19:
  
 
==See also==
 
==See also==
*[[VAxx]], the numbered local variables
+
*[[OVxx]], the numbered target agent variables
 
*[[NAMN]], which loops over NAME variables
 
*[[NAMN]], which loops over NAME variables
 
*[[MAME]] and [[GAME]], the other named variables
 
*[[MAME]] and [[GAME]], the other named variables
  
 
[[Category:C3 CAOS Commands]]
 
[[Category:C3 CAOS Commands]]

Revision as of 20:43, 15 February 2006

NAME is a CAOS command which allows access to named local variables.

Usage

Syntax: NAME varname (anything)

This returns the target agent variable referred to by varname. varname may be anything at all - integer, string, agent, etc.

NAME variables are effectively named OVxx variables.

Examples

Assuming a Creature is selected:

SETV NAME NORN 42
DIVV NAME NORN 6
OUTV NAME NORN
    7

and so on.

See also

  • OVxx, the numbered target agent variables
  • NAMN, which loops over NAME variables
  • MAME and GAME, the other named variables