Key Condition

From AgentCubes
Revision as of 20:35, 17 June 2011 by imported>Andri
Jump to navigation Jump to search

Key condition.png

Definition: The Key The Key condition checks if the key displayed in its Key parameter is pressed. If the key indicated is pressed, the condition is true. Otherwise, the condition is false. The Key condition can be used to assign real-time keyboard control to agents. You might use it to assign "hot key" values to get agents to act out specified actions when certain keys are pressed. To get Key conditions to function as hot keys you will have to place them in rules in a method that is checked at every simulation cycle.
Parameters: key
Example: 500px