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

# npc.isturn

```lua
npc.isturn()
```

|                         |                                                                    |
| ----------------------- | ------------------------------------------------------------------ |
| id                      | `0x0502`                                                           |
| arguments               | 0                                                                  |
| result                  | int: goes to the very next call, or to `npc.lua(npc.isturn(), fn)` |
| in NPC Kit              | yes                                                                |
| measured from a kit NPC | returns                                                            |
| vanilla scripts         | 1332 calls in 155 of 1114 scripts                                  |

## What it does

Gives `1` while the NPC's body is in a turn that plays the turn motion (60° or more), or in a stepped or timed turn; `0` when nothing turns and during the short turn of under 60°. A result.

## Result

`1` or `0`.

## Timing

Returns at once.

## In NPC Kit

Vanilla talks write `if (isturn()) { turnsync(); ... }`, which a recorded script can't hold. In the kit just call [turnsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/turnsync.md): with nothing turning it returns at once. The one difference: `turnsync` also waits for the short turn that `isturn` reports as `0`.

## Used with

* [turnsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/turnsync.md).

## Example

Vanilla's `if (isturn()) { turnsync(); }` in the kit is just the wait: with nothing turning it returns at once.

```lua
talk = function()
    npc.sethpmenu(0);
    npc.ucoff();
    npc.turnsync();                -- instead of if (isturn()) turnsync();
    talkOpen();
    -- ...
end,
```

To use the value in Lua: `npc.lua(npc.isturn(), function(handle, turning) ... end)`.
