Mouse Click Trigger

Definition: The Mouse Click trigger is used to program an agent to respond to a modified or unmodified Mouse click.

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.

Parameters: Mouse Click
Example: In the Number Puzzle simulation, a single mouse click with the Arrow Tool on the Digit agent causes it to swap with the empty space next to it. If the Digit is 15, it also highlights the agent before swapping.

Number Puzzle

See the Number Puzzle simulation.

| Next | Previous | Reference Manual | Getting Started Manual |