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

# npc.setradius

```lua
npc.setradius(radius)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x0220`                        |
| arguments               | 1: Float                        |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 106 calls in 23 of 1114 scripts |

## What it does

Sets the radius of the NPC's collision body, the same on both axes: how close the party and other actors can come. The touch and talk areas, which follow the body, are rebuilt around it, so a bigger body also widens where the talk prompt shows. The one-value form of [setradius\_221](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setradius_221.md).

## Arguments

### `radius` (Float)

The radius. Vanilla's values (106 calls): `0.2` (42, each right after a `bindp2_d4`), `0.3` (10), `0.4` (9), `0.7` (8), `0.5`, `0.8`, up to `6`. An integer works: the game reads it as a float.

## Timing

Returns at once.

## In NPC Kit

`npc.setradius(npc.getdefaultradiusw())` puts the body back to the model's own size. Not tested on a kit NPC.

## Used with

* [bindp2\_d4](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/bindp2_d4.md) before it in `init`: vanilla sets the radius once the model is bound.
* [setscale](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setscale.md) before it: the radius is taken with the actor's scale.
* [talkradius](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/talkradius.md) / [touchradius](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/touchradius.md): the talk and touch areas, which this call rebuilds around the new body.
* [getdefaultradiusw](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getdefaultradiusw.md): the model's own radius.

## Example

```lua
init = function()
    npc.bindp2_d4(0x006E0019, 4, 3);
    npc.setradius(0.2);                  -- a slim body: the party can stand close
end,
```

## Pitfalls

* A bigger body widens the talk prompt's area too: the talk area follows the body.
