> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/rlookatt_258.md).

# npc.rlookatt\_258

```lua
npc.rlookatt_258(x, y, z, duration)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x0258`                        |
| arguments               | 4: Float, Float, Float, Float   |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 125 calls in 16 of 1114 scripts |

## What it does

Turns the NPC's head toward a point of the map over a set number of frames, and the script goes on at once. The head keeps looking at that point until [lookatoff](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatoff.md). The body does not turn. [rlookat\_257](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/rlookat_257.md) is the same turn at the NPC's own head speed.

## Arguments

### `x` (Float)

The point's x, in map coordinates.

### `y` (Float)

The point's height.

### `z` (Float)

The point's z.

### `duration` (Float)

How long the turn takes, in frames. Vanilla: `0` 53 times, `30` 32, `20` 21.

## Timing

Returns at once; the head turns over the next `duration` frames. [lookatsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatsync.md) waits for it.

## In NPC Kit

[lookatt\_250](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatt_250.md) is the same turn with the wait.

## Used with

* [lookatsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatsync.md): wait for the head when the next step needs it there.
* [lookatt\_250](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatt_250.md): the same with the wait.
* [lookatoff](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookatoff.md): the head back to straight.

## Example

The guard's head follows the gate slowly while he speaks.

```lua
local afterDark = [[
Nobody passes after dark, by the captain's order.
Come back at dawn, and the gate will be open.
]]

talk = function()
    talkOpen();
    npc.rlookatt_258(72.0, 4.0, 39.0, 30);
    npc.lua(function(handle) say(handle, afterDark) end);
    talkClose();
end,
```

## Pitfalls

* No wait: a line that should come once the head is there needs `lookatsync` first.
