force

force <creature> <string>

Make a creature execute a command.

The named creature runs the command line as if it had typed it, regardless of who owns the script. Use this to drive another creature; use do to drive the owner itself.

Arguments

Returns

null. Like the other action commands, a successful force in the handle phase suppresses the event's default action.

Examples

after command (say) {
  force $actor "smile"
}

The actor is made to smile. The script compiles and runs to completion.

handle command (bow) {
  force $actor "say I bow before you, $self."
}

When someone bows, that creature is forced to speak a line that names the owner ($self), and the handle-phase force suppresses the default bow.

See also