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

# npc.fetchambient

```lua
npc.fetchambient()
```

|                         |                                  |
| ----------------------- | -------------------------------- |
| id                      | `0x04E0`                         |
| arguments               | 0                                |
| in NPC Kit              | yes                              |
| measured from a kit NPC | returns                          |
| vanilla scripts         | 319 calls in 125 of 1114 scripts |

## What it does

Lights the NPC with the map's colour at the spot it stands on: the model is tinted with the colour of the ground under it, and keeps that tint (the game stops refreshing it from the ground).

## Timing

Returns at once.

## In NPC Kit

* In `init`, after `setpos2`: without it the NPC can look too bright or too dark for where it stands.
* After moving an NPC far (a scene putting it somewhere else), call it again there.

## Used with

* [setpos2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setpos2.md) before it.
* [fetchambient\_4e1](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/fetchambient_4e1.md): the colour of another point, for an NPC above the floor.
* [usemapid](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/usemapid.md).

## Example

```lua
npc.setpos2(29.36, -9.0, 68.65);
npc.dir(1.676);
npc.fetchambient();
```
