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

# npc.getmapjumpanglebyindex

```lua
npc.getmapjumpanglebyindex(entrance)
```

|                         |                                                                                         |
| ----------------------- | --------------------------------------------------------------------------------------- |
| id                      | `0x0323`                                                                                |
| arguments               | 1: Int                                                                                  |
| result                  | float: goes to the very next call, or to `npc.lua(npc.getmapjumpanglebyindex(...), fn)` |
| in NPC Kit              | yes                                                                                     |
| measured from a kit NPC | returns                                                                                 |
| vanilla scripts         | 903 calls in 238 of 1114 scripts                                                        |

## What it does

Gives the facing angle of one of the map's entrances. A result.

## Arguments

### `entrance` (Int)

The entrance index; vanilla passes `nowjumpindex()`.

## Result

The angle, radians, a float, within -π..π; `0.0` when the map has no such entrance.

## Timing

Returns at once.

## In NPC Kit

`npc.resetbehindcamera` takes it first in vanilla, with arithmetic the kit can't record; feed it straight to a call that takes a heading first: `npc.aturn_261(npc.getmapjumpanglebyindex(0))`.

## Used with

* [nowjumpindex](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/nowjumpindex.md), [resetbehindcamera](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/resetbehindcamera.md).

## Example

An NPC that, in a beat, turns to face the way the map's entrance 0 faces.

```lua
faceEntrance = function()
    npc.aturn_261(npc.getmapjumpanglebyindex(0));
end,
```
