Navigation Bar AgentSheets Education R&D Support About Us Manuals Tutorial Movies FAQ Books Classes

Tool Trigger

Definition: The Tool trigger is used to program an agent to respond to clicks with the worksheet tools.

The rules located in a method labeled with a Tool trigger are executed whenever the executing agent senses a click from the designated tool, whether the simulation is running or not.

Warning Warning: If you redefine the Arrow, Eraser, and Pencil tools, you will overwrite system functionality as follows:
Arrow - You will be unable to select the agent in the worksheet, if that agent redefines the Arrow tool.
Eraser - You will be unable to erase an agent in the worksheet, if that agent redefines the Eraser tool.
Pencil - Clicking on the agent that redefines the Pencil tool will execute the rules you specified under the Tool trigger and will not add the agent selected in the gallery to the worksheet. Clicking anywhere else with the Pencil tool will still allow you to add the agent selected in the gallery to the worksheet.
Parameters: Tool
Example:
When the Pencil tool is used on the Cell agent in the Game of Life simulation, it toggles between the dead and alive depictions.

Game of Life


reference manual | ©2010 AgentSheets, Inc. | contact us