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

# npc.settalkradiusoffset

```lua
npc.settalkradiusoffset(x, y, z)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x0248`                        |
| arguments               | 3: Float, Float, Float          |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 211 calls in 95 of 1114 scripts |

## What it does

Stores an offset for the NPC's talk area, an `x, y, z` from its position. Which test reads it is not confirmed, so which way it moves the area is not either.

## Arguments

### `x` (Float)

### `y` (Float)

### `z` (Float)

The offset from the NPC's position. Vanilla: `(0, 0, 0)` most, `(0, 0, -0.5)`, `(1, -1, 1)`.

## Timing

Returns at once.

## In NPC Kit

Not tested on a kit NPC. By what it moves, an offset toward the player's side should bring the talk area out in front of a vendor behind a counter; check it in the game.

## Used with

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

## Example

The talk area moved half a unit in front of a vendor behind a counter (vanilla's `(0, 0, -0.5)`).

```lua
init = function()
    -- ...
    npc.setpos2(29.36, -9.0, 68.65);
    npc.dir(1.676);
    npc.settalkradiusoffset(0, 0, -0.5);
    npc.talkradius(0.8);
    -- ...
end,
```

## Pitfalls

* Whether the offset follows the map axes or the NPC's facing is not confirmed: check which way `-0.5` moves it on your map. Not tested on a kit NPC.
