Difference between revisions of "Key Condition"
Jump to navigation
Jump to search
imported>Mike |
imported>Repenning |
||
Line 1: | Line 1: | ||
− | [[ | + | [[Image:Key.png|150px|Key.png]] |
− | [[ | + | [[Image:Key condition.png|150px|Key condition.png]] |
− | + | {| cellpadding="10" cellspacing="0" border="0" width="100%" | |
− | + | |- | |
− | + | | align="left" valign="top" width="80" | '''Definition:''' | |
− | + | | align="left" valign="top" width="100%" | | |
− | + | True if the specified key is pressed on keyboard. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ||
+ | |||
+ | ''Please note that you cannot use the DELETE key as an argument for the key condition. It is reserved in the AgentCubes software for deleting text, and commands in behaviors.'' | ||
+ | |||
+ | |- | ||
+ | | align="left" valign="top" width="80" | '''Parameters:''' | ||
+ | | align="left" valign="top" width="100%" | [[Key parameter|key]] | ||
+ | |- | ||
+ | | align="left" valign="top" width="80" | '''Example:''' | ||
+ | | align="left" valign="top" width="100%" | | ||
+ | Create a cursor controlled agent by using 4 rules: | ||
+ | |||
+ | IF '''key(up)''' THEN move(up) | ||
+ | |||
+ | IF '''key(down)''' THEN move(down) | ||
+ | |||
+ | IF '''key(left)''' THEN move(left) | ||
+ | |||
+ | IF '''key(right''') THEN move(right) | ||
+ | |||
+ | |} | ||
[[Category:AgentCubes_Conditions]] | [[Category:AgentCubes_Conditions]] |
Latest revision as of 03:20, 20 April 2012
Definition: |
True if the specified key is pressed on keyboard.
Please note that you cannot use the DELETE key as an argument for the key condition. It is reserved in the AgentCubes software for deleting text, and commands in behaviors. |
Parameters: | key |
Example: |
Create a cursor controlled agent by using 4 rules: IF key(up) THEN move(up) IF key(down) THEN move(down) IF key(left) THEN move(left) IF key(right) THEN move(right) |