Methods

From AgentSheetsWiki

(Difference between revisions)
Jump to: navigation, search
Line 5: Line 5:
*'''When Creating A New Agent''':&nbsp;This trigger executes the enclosed rules whenever a new agent is created in a worksheet using the Draw tool, the Volume Insert tool, or the New action.&nbsp;The When Creating New Agent trigger is usually used to initialize the agent's state.<br>
*'''When Creating A New Agent''':&nbsp;This trigger executes the enclosed rules whenever a new agent is created in a worksheet using the Draw tool, the Volume Insert tool, or the New action.&nbsp;The When Creating New Agent trigger is usually used to initialize the agent's state.<br>
*'''On Mouse Click''':&nbsp;The Mouse Click trigger is used to program an agent to respond to a modified or unmodified mouse click.<br>The rules located in a method labeled with a Mouse Click trigger are executed whenever the executing agent senses the designated mouse click (modified or unmodified), whether the simulation is running or not. The Mouse Click trigger increases the number of ways in which you can interact with your agents in the world.
*'''On Mouse Click''':&nbsp;The Mouse Click trigger is used to program an agent to respond to a modified or unmodified mouse click.<br>The rules located in a method labeled with a Mouse Click trigger are executed whenever the executing agent senses the designated mouse click (modified or unmodified), whether the simulation is running or not. The Mouse Click trigger increases the number of ways in which you can interact with your agents in the world.
-
*'''On Mouse Hover''': ???
 
The behavior editor for a new agent or an agent with no behavior comes up with a single method containing the While Running trigger and one empty rule.
The behavior editor for a new agent or an agent with no behavior comes up with a single method containing the While Running trigger and one empty rule.

Revision as of 17:41, 11 October 2011

An agent's behavior can contain any number of methods. A method is a segment of the agent's behavior that contains a set of rules. A trigger is at the head of every method and determines when the method will be called. Triggers that label method boxes in the Visual AgenTalk language behavior editors include:

The behavior editor for a new agent or an agent with no behavior comes up with a single method containing the While Running trigger and one empty rule.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox