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
<vnum>— the destination room's vnum, an int.[pause]— an int number of ticks to wait between steps. Defaults to1when omitted.
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
walkto— walk to a room on foot instead of driving.stepto— take a single step toward a room on foot.pause— the suspensiondrivetouses between steps.- Handlers, events, and phases