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

Editing CAOS

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 14: Line 14:
 
CAOS scripts have 100 registers of the form [[VAxx|VA''xx'']] to use to hold temporary variables. In addition, an object may be selected into the special register [[TARG]], and then 100 [[attributes]] of the object may be accessed with registers of the form [[OVxx|OV''xx'']]. In most cases an object must be selected into TARG before it is acted upon. Using the command [[AVAR]] to access the OV''xx'' variables of an agent without having to fiddle with TARG, one can implement simple arrays.
 
CAOS scripts have 100 registers of the form [[VAxx|VA''xx'']] to use to hold temporary variables. In addition, an object may be selected into the special register [[TARG]], and then 100 [[attributes]] of the object may be accessed with registers of the form [[OVxx|OV''xx'']]. In most cases an object must be selected into TARG before it is acted upon. Using the command [[AVAR]] to access the OV''xx'' variables of an agent without having to fiddle with TARG, one can implement simple arrays.
  
Note that while [[Creatures]] and [[Creatures 2]], for performance reasons, use unsigned bytes (0-255) as integer types, later versions of the engine use 'normal' 32-bit integers (which can be very large) as well as floating point numbers (eg: 3.141593).
+
Note that while [[Creatures]] and [[Creatures 2]], for performance reasons, use unsigned bytes (0-255) as integer types, later versions of the engine use 'normal' 32-bit integers (which can be very large) as well as floating point numbers (eg: 3.141592).
  
 
==Lists of CAOS Commands by Game==
 
==Lists of CAOS Commands by Game==

All contributions to Creatures Wiki are considered to be released under the CC-BY-SA and GFDL (see Creatures Wiki:Copyrights for details).

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)