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

# npc.effectactor

```lua
npc.effectactor(anchor)
```

|                         |                                  |
| ----------------------- | -------------------------------- |
| id                      | `0x0126`                         |
| arguments               | 1: Int                           |
| in NPC Kit              | yes                              |
| measured from a kit NPC | returns                          |
| vanilla scripts         | 490 calls in 148 of 1114 scripts |

## What it does

Names the NPC as effect anchor `n`: effects of the map that are placed on anchor `n` then play on this NPC.

## Arguments

### `anchor` (Int)

The anchor, 0 to 63. Vanilla: `0`, `16`, `48`, `49`, `4`, `50`.

## Timing

Returns at once.

## In NPC Kit

Only useful with effects the map's own scripts or files play on that anchor; the kit has no way to author such an effect. Not tested on a kit NPC.

## Used with

* [common2effectplay](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/common2effectplay.md): an effect that needs no anchor.

## Example

The vanilla shape, in `init`: the NPC named as anchor 0 for the map's own effects.

```lua
init = function()
    -- ...
    npc.effectactor(0);
end,
```

## Pitfalls

* The kit can't author an effect placed on an anchor: for an effect of your own, use [common2effectplay](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/common2effectplay.md). Not tested on a kit NPC.
