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

Difference between revisions of "FALL"

From Creatures Wiki
Jump to navigation Jump to search
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''FALL'''
+
'''FALL''' is a [[CAOS]] command used to test if an [[agent]] is falling.
  
*returns 0 if the targ agent isn't falling, or "isn't in the air"
+
==Usage==
*returns 1 if the agent is falling
+
Syntax: ''FALL''
  
sample code:
+
Returns 1 if [[TARG]] is falling under gravity, or 0 if not.
  
doif fall = 1
+
==Example==
gsub fall
+
Execute a [[SUBR|subroutine]] if falling.
endi
+
<pre>
 +
DOIF FALL eq 1
 +
  GSUB falling
 +
ENDI
 +
</pre>
 +
 
 +
[[Category:C3 CAOS Commands]]

Latest revision as of 18:52, 23 January 2006

FALL is a CAOS command used to test if an agent is falling.

Usage[edit]

Syntax: FALL

Returns 1 if TARG is falling under gravity, or 0 if not.

Example[edit]

Execute a subroutine if falling.

DOIF FALL eq 1
  GSUB falling
ENDI