Difference between revisions of "Empty Condition"
Jump to navigation
Jump to search
imported>Mike |
imported>Repenning |
||
Line 1: | Line 1: | ||
− | [[ | + | [[Image:Empty.png|150px|Empty.png]] |
− | [[ | + | [[Image:Empty expanded1.png|150px|Empty expanded1.png]] |
− | + | {| cellpadding="10" cellspacing="0" border="0" width="100%" | |
− | + | |- | |
− | + | | align="left" valign="top" width="80" | '''Definition:''' | |
− | + | | align="left" valign="top" width="100%" | Check in a certain direction to see if that cell exists and is empty. Typically this is used to make sure you can move into a cell. All the cells beyond the edge of the world are considered NOT empty. That is you could NOT move there. | |
− | + | |- | |
− | + | | align="left" valign="top" width="80" | '''Parameters:''' | |
− | + | | align="left" valign="top" width="100%" | | |
− | + | [[Direction parameter|direction]] ''the direction in which you check if there is an empty cell'' | |
− | + | [[Layer parameter|layer]] ''relative layer reference: 0 = same layer, > 0 layers above, < 0 layers below'' | |
− | |||
− | |||
− | |||
− | [[ | ||
− | |||
− | + | |- | |
+ | | align="left" valign="top" width="80" | '''Example:''' | ||
+ | | align="left" valign="top" width="100%" | move right if you can: IF empty(right) THEN move(right) | ||
+ | |} | ||
[[Category:AgentCubes_Conditions]] | [[Category:AgentCubes_Conditions]] |
Revision as of 00:49, 20 April 2012
Definition: | Check in a certain direction to see if that cell exists and is empty. Typically this is used to make sure you can move into a cell. All the cells beyond the edge of the world are considered NOT empty. That is you could NOT move there. |
Parameters: |
direction the direction in which you check if there is an empty cell layer relative layer reference: 0 = same layer, > 0 layers above, < 0 layers below |
Example: | move right if you can: IF empty(right) THEN move(right) |