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

# npc.turnsync

```lua
npc.turnsync()
```

|                         |                                                   |
| ----------------------- | ------------------------------------------------- |
| id                      | `0x0046`                                          |
| arguments               | 0                                                 |
| in NPC Kit              | yes                                               |
| measured from a kit NPC | waits: holds the script until its condition holds |
| vanilla scripts         | 6610 calls in 425 of 1114 scripts                 |

## What it does

Holds the script until the NPC's turn or walk has ended: the one a `raturna`, `aturn`, `aturn_261`, `turn` or move call started.

## Timing

Waits, once a frame, while the NPC's turn or move is still running. Returns at once when nothing is running.

## In NPC Kit

* After `raturna(-1)` in `talkOpen`, so the talking pose starts once the NPC faces the player.
* On another NPC in a scene: `npc.on("id").turnsync()` waits for that NPC's turn.
* Start several turns first, then sync each actor: they turn together.

## Used with

* [raturna](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/raturna.md), [aturn\_261](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/aturn_261.md), [aturn](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/aturn.md), [turn](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/turn.md): the turn it waits for.
* [rmove](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/rmove.md): it waits for a walk too.

## Example

```lua
npc.aturn(guest[1], guest[2], guest[3]);
other.aturn(guest[1], guest[2], guest[3]);
other.turnsync();
npc.turnsync();
```
