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:
- While running: the agent's main method is labeled with the While Running trigger. This method is repeatedly called once at each simulation cycle (time step) while the simulation is running.
- On <method_name>: a user-defined method that gets called by the agent that contains it or any other agent using the Message or the Broadcast action.
- When Creating A New Agent:
- On Mouse Click
- 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.