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

# npc.setfreetargettype

```lua
npc.setfreetargettype(type)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x0265`                        |
| arguments               | 1: Int                          |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 302 calls in 92 of 1114 scripts |

## What it does

Sets the NPC's actor type, which decides which triggers the talk button can start on it. A kit NPC is type `5` and talks through trigger 2; the game's talk test only accepts that trigger with type `5`, so any other value ends the talk button on the NPC. Type `4` turns it into a sign actor: triggers 8 and 13 on, which ask for the field sign label ([fieldsignicon](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fieldsignicon.md)). Any other type turns those two off.

## Arguments

### `type` (Int)

The type. Vanilla: `4` (260 calls), `3`, `6`, `1`. `1` is the type of the other talk trigger (10), `5` the kit's.

## Timing

Returns at once.

## In NPC Kit

Leave it out. A kit NPC already has the type its `talk` needs; the call only takes it away.

## Used with

* [fieldsignicon](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fieldsignicon.md), the label a type `4` actor asks for.

## Example

Putting the NPC back to the kit's type after a test that changed it.

```lua
npc.setfreetargettype(5);
```

## Pitfalls

* `setfreetargettype(4)`, vanilla's most common value, makes a kit NPC deaf to the talk button.
