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


From Creatures Wiki
Jump to navigation Jump to search

SUBV is a CAOS command used to subtract from a variable.


Syntax: SUBV var (variable) x (int or float)

Subtracts x from var, i.e. performs var = var - x. If the types of var and x do not match, var will be cast to the best precision; so if var is int and x is float, var will become a float.


SUBV used to decrease a variable:

setv va00 3
subv va00 1.2
outv va00

Adapted from the basic interactive plant script, used to shrink the plant down into an immature phase:

doif pose gt 0  
   setv va00 pose   
   subv va00 1   
   pose va00  

See also[edit]