> 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/rlookat_257.md).

# npc.rlookat\_257

```lua
npc.rlookat_257(x, y, z)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x0257`                          |
| arguments               | 3: Float, Float, Float            |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 1562 calls in 351 of 1114 scripts |

## What it does

Turns the NPC's head toward a point of the map, 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.

## Arguments

### `x` (Float)

The point's x, in map coordinates.

### `y` (Float)

The point's height. Most vanilla calls (1,368 of 1,562) pass a point their map script keeps (`mp_map_set_x`, `mp_map_set_y - 1.2`, `mp_map_set_z`); in the kit, write the numbers.

### `z` (Float)

The point's z.

## Timing

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

## In NPC Kit

In the editor's Head group, live on the selected NPC. [lookat\_24f](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookat_24f.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.
* [lookat\_24f](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/lookat_24f.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 merchant glances at the stall while the talk motion starts.

```lua
local bhujerba = [[
Fresh from Bhujerba, the finest goods in Ivalice.
Have a look, you'll find nothing quite like it.
]]

talk = function()
    talkOpen();
    npc.rlookat_257(72.0, 4.0, 39.0);        -- the head starts turning
    npc.stdmotionplay_2c2(0x01000002, 20);   -- talking, at the same time
    npc.lookatsync();
    npc.lua(function(handle) say(handle, bhujerba) end);
    talkClose();
end,
```

## Pitfalls

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