Difference between revisions of "Manual:DIL Manual/walkto()"
Jump to navigation
Jump to search
(XML import) |
(checked against the compiler and the interpreter; example compiles) |
||
| Line 1: | Line 1: | ||
| − | + | = walkto() = | |
| − | + | '''Obsolete.''' DIL has no procedure <code>walkto()</code>; vmc doesn't know the name. | |
| − | |||
| − | |||
| − | + | To find the way, [[Manual:DIL Manual/pathto()|pathto()]] gives the direction of the next step from where a unit is towards a room. To take the step, run the direction as a command, <code>exec("north", self)</code>, and check <code>self.outside</code> afterwards. The function <code>walk_room@function("inn@udgaard", speed)</code> in function.zon walks a monster all the way to the room with that symbolic name and returns TRUE when it got there. <code>pathto()</code> only finds routes that can be walked both ways, so it fails across one-way exits. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | < | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
Latest revision as of 23:25, 14 November 2026
walkto()
Obsolete. DIL has no procedure walkto(); vmc doesn't know the name.
To find the way, pathto() gives the direction of the next step from where a unit is towards a room. To take the step, run the direction as a command, exec("north", self), and check self.outside afterwards. The function walk_room@function("inn@udgaard", speed) in function.zon walks a monster all the way to the room with that symbolic name and returns TRUE when it got there. pathto() only finds routes that can be walked both ways, so it fails across one-way exits.