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

# npc.setaturnlookatlockstatus

```lua
npc.setaturnlookatlockstatus(state)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x0281`                          |
| arguments               | 1: Int                            |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 2460 calls in 192 of 1114 scripts |

## What it does

Sets how the NPC turns when a turn has no set length. With it on (`1`) every such turn is a body turn that plays the turn-right or turn-left motion; off (`0`), a turn under 60° can take another path when the model allows it.

## Arguments

### `state` (Int)

`1` on, `0` off. Vanilla: `0` 1,356 times, `1` 314.

## Timing

Returns at once; it applies to the next turns.

## In NPC Kit

* `talkOpen` sets it to `0` before turning to the player (`raturna(-1)`).
* `talkterm` sets it to `1` and turns back with `aturn_261(getdestrotangzx_227(0))`: vanilla does that only when the heading changed during the talk.

## Used with

* [raturna](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/raturna.md) + [turnsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/turnsync.md) after it in `talkOpen`.
* [aturn\_261](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/aturn_261.md) and [getdestrotangzx\_227](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getdestrotangzx_227.md) in `talkterm`.

## Example

Off before the NPC turns to the player in `talkOpen`, on again in `talkterm` before it turns back.

```lua
local function talkOpen()
    npc.sethpmenu(0);
    npc.ucoff();
    npc.settrapshowstatus(0);
    npc.setaturnlookatlockstatus(0);
    npc.raturna(-1);
    npc.turnsync();
    -- ...
end

local function talkTerm()
    npc.setaturnlookatlockstatus(1);
    npc.aturn_261(npc.getdestrotangzx_227(0));
end
```
