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

# npc.talkradius

```lua
npc.talkradius(radius)
```

|                         |                                  |
| ----------------------- | -------------------------------- |
| id                      | `0x002D`                         |
| arguments               | 1: Float                         |
| in NPC Kit              | yes                              |
| measured from a kit NPC | returns                          |
| vanilla scripts         | 244 calls in 118 of 1114 scripts |

## What it does

Sets how far around the NPC's body the player can stand and still get the talk button: a margin added to the body's size, and the talk area then follows the body.

## Arguments

### `radius` (Float)

The margin. The default reads `0.5`. Vanilla: `0.3` (101 calls), `1`, `0.2`, `0.8`, `0.15`.

## Timing

Returns at once.

## In NPC Kit

A kit NPC with a `talk` has the default area; a larger margin widens it. 8% of vanilla NPCs call it. Not tested on a kit NPC.

## Used with

* [settalkradiusoffset](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/settalkradiusoffset.md): move the point the area is measured from.
* [setradius\_221](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setradius_221.md): the body the area follows.

## Example

A vendor behind a wide counter: the talk margin grows from the default `0.5` to `1`, so the button comes up from the customer's side.

```lua
init = function()
    -- ... the vanilla setup ...
    npc.setpos2(29.36, -9.0, 68.65);
    npc.dir(1.676);
    npc.talkradius(1.0);
    -- ...
end,
```

## Pitfalls

* Not tested on a kit NPC. Too big a margin catches the player walking past.
