stepto

stepto <room>

Take a single movement step toward a room.

The owner mobile computes the first step of a path to the target room and moves once in that direction. It does not keep walking — call it again (for example on each tick) to make progress over several steps. To travel the whole way in one statement, use walkto.

Arguments

Returns

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

Owner

The owner must be a mobile. For any other owner the command does nothing. The owner must also be at least standing; a sitting, sleeping, or resting mob cannot step.

Examples

after command (tick) {
  stepto [room 1]
}

On each tick the mob takes one step toward room 1, following the shortest path. (In the single-room test world the owner is already in room 1, so no movement occurs — but the call runs without error.)

See also