driveto

driveto <vnum> [pause]

Drive a vehicle to a room, one step at a time.

driveto is the vehicular counterpart of walkto. The compiler expands it into a stepping loop: the owner mobile operates the vehicle controlled from a console in its current room, moving the vehicle one room closer to the destination, pauses, and repeats until it arrives or can no longer make progress.

Arguments

Returns

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

Owner

The owner must be a mobile, at least sitting (the driving position), in a room that contains a vehicle console. For any other owner — or with no console or vehicle present — the expanded loop takes no steps.

Examples

after command (say) {
  driveto 3001 2
}

The mob drives the vehicle toward room 3001, pausing two ticks between steps, until it arrives or gets stuck.

See also