---
name: "BIS_fnc_reviveOnState"
type: function
status: ok
groups: ["Revive"]
arma3_since: "1.42"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_reviveOnState
revid: 328509
updated: 2022-07-13T16:26:08Z
---

# BIS_fnc_reviveOnState

*Function · Revive · Arma 3 v1.42*

## Description

Used to execute specific code localy on every client whenever unit's state changes.

## Syntax

```sqf
[] call BIS_fnc_reviveOnState
```

**Parameters:**

- `param0` — 0: STRING - Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.
- `param1` — 1: SCALAR - State.
- `param2` — 2: OBJECT - Unit to set the status for.

**Returns:** True if successful, false if not.

States:
    #define STATE_RESPAWNED            0
    #define STATE_REVIVED            1
    #define STATE_INCAPACITATED        2
    #define STATE_DEAD                3

## Examples

### Example 1

```sqf
{ [objNull, 1, _x] call BIS_fnc_reviveOnState; } forEach (curatorSelected select 0);
```

## Function header

The comment at the top of the function's file in the game; this page's description, params, returns come from it.

```sqf
/*
Author: Jiri Wainar

Description:
Used to execute specific code localy on every client whenever unit's state changes.

Parameters:
    _this select 0: STRING - Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.
    _this select 1: SCALAR - State.
    _this select 2: OBJECT - Unit to set the status for.

Returns:
True if successful, false if not.

States:
    #define STATE_RESPAWNED            0
    #define STATE_REVIVED            1
    #define STATE_INCAPACITATED        2
    #define STATE_DEAD                3
*/
```

<sub>Source: [BI Community Wiki — BIS fnc reviveOnState](https://community.bistudio.com/wiki/BIS_fnc_reviveOnState) (revision 328509).</sub>
