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

# npc.isdead2\_49f

```lua
npc.isdead2_49f(actor)
```

|                         |                                                                            |
| ----------------------- | -------------------------------------------------------------------------- |
| id                      | `0x049F`                                                                   |
| arguments               | 1: Int                                                                     |
| result                  | int: goes to the very next call, or to `npc.lua(npc.isdead2_49f(...), fn)` |
| in NPC Kit              | yes                                                                        |
| measured from a kit NPC | returns                                                                    |
| vanilla scripts         | 658 calls in 129 of 1114 scripts                                           |

## What it does

Gives whether an actor's battle unit is down: `0` with no battle unit, `2` when it is KO, Stone or in X-Zone (outside a town), `1` otherwise. A result.

## Arguments

### `actor` (Int)

The actor. Vanilla tests party members (`PC00`–`PC03`).

## Result

`0`, `1` or `2`. In a town a KO member reads `1`.

## Timing

Returns at once.

## In NPC Kit

**Avoid it.** The index is counted in the running script's own set, and a kit NPC's script runs in the kit's set: the party members are not in it. Every index there is a kit NPC, which has no battle unit, so the answer is always `0`; an index past the set's last actor (`-1` included) reads a null actor and crashes the game.

## Used with

* [common2effectplay](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/common2effectplay.md): vanilla's revive flash on a party member.

## Example

None: in the kit it can only answer `0`. Vanilla calls it through the `sys` form on the party members (`PC00`..`PC03`, 81 times each), for reference only:

```c
if (sysIsdead2_49f(PC00) != 0)
{
    // revive flash on the member
}
```

## Pitfalls

* An index that names no actor of the running set crashes the game.
* In a town a KO member reads `1`.
