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

# npc.aturn\_261

```lua
npc.aturn_261(heading)
```

|                         |                                                                         |
| ----------------------- | ----------------------------------------------------------------------- |
| id                      | `0x0261`                                                                |
| arguments               | 1: Float                                                                |
| in NPC Kit              | yes                                                                     |
| measured from a kit NPC | returns                                                                 |
| waits                   | it has a wait handler: it can hold the script, and in `talk` the player |
| vanilla scripts         | 2124 calls in 193 of 1114 scripts                                       |

## What it does

Turns the NPC to a heading, with its turn motion and its head, holding the script until the turn ends. The visible form of [dir](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/dir.md).

## Arguments

### `heading` (Float)

The heading in radians (as `dir` takes it: `0` faces +z, `1.5708` +x). Vanilla: `getdestrotangzx_227(0)` in 843 of 2,124 calls (turning back after a talk), literals otherwise.

## Timing

Waits until the turn has ended.

## In NPC Kit

* `talkterm`: `npc.aturn_261(npc.getdestrotangzx_227(0))` turns the NPC back.
* A scene: turn one actor to face another, heading computed in Lua with `math.atan(to[1] - from[1], to[3] - from[3])`.

## Used with

* [getdestrotangzx\_227](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getdestrotangzx_227.md): the heading it had.
* [turnsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/turnsync.md): to wait on another NPC's turn (`npc.on("id").turnsync()`).
* [dir](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/dir.md): the same heading at once.

## Example

```lua
spin = function()
    npc.aturn_261(2.0944);
    npc.aturn_261(-2.0944);
    npc.aturn_261(0.0);
end,
```
