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

# npc.ucoff

```lua
npc.ucoff()
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x000E`                          |
| arguments               | 0                                 |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 8002 calls in 802 of 1114 scripts |

## What it does

Takes the player's control away: the leader stops and the pad no longer moves the party. It also stops the movement in progress of every party member and closes an open menu.

## Timing

Returns at once.

## In NPC Kit

* In `talkOpen`, after `sethpmenu(0)`. [ucon](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/ucon.md) in `talkClose` gives control back.
* While control is off, [ucmove](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/ucmove.md) walks the leader to a mark (scenes).
* **There is no nesting.** Two owners of control undo each other: whoever calls last wins. A Lua script that locks control (`dialog.userControl`) and an NPC's `ucon` don't know about each other.

## Used with

* [ucon](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/ucon.md): always paired.
* [sethpmenu](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/sethpmenu.md), [settrapshowstatus](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/settrapshowstatus.md).

## Example

```lua
local function talkOpen()
    npc.sethpmenu(0);
    npc.ucoff();                 -- the party stops; the pad no longer moves it
    npc.settrapshowstatus(0);
    npc.setaturnlookatlockstatus(0);
    npc.raturna(-1);
    npc.turnsync();
    -- ...
end
```

In a scene, with control off, the leader is walked to a mark: `npc.ucmove(x, y, z); npc.ucmovesync();`.

## Pitfalls

* Every way out of the talk must reach the `ucon`, or the player can't move.
