{"name":"BIS_fnc_reviveOnState","title":"BIS fnc reviveOnState","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_reviveOnState","revid":328509,"updated":"2022-07-13T16:26:08Z","groups":["Revive"],"status":"ok","games":{"arma3":"1.42"},"since":"arma3 1.42","arma3_since":"1.42","description":"Used to execute specific code localy on every client whenever unit's state changes.","syntaxes":[{"syntax":"[] call BIS_fnc_reviveOnState","params":[{"name":"param0","type":"String","type_expr":"String","description":"Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.","text":"0: STRING - Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.","source":"docblock"},{"name":"param1","type":"Number","type_expr":"Number","description":"State.","text":"1: SCALAR - State.","source":"docblock"},{"name":"param2","type":"Object","type_expr":"Object","description":"Unit to set the status for.","text":"2: OBJECT - Unit to set the status for.","source":"docblock"}],"returns":{"type":"Boolean","type_expr":"Boolean","text":"True if successful, false if not.\n\nStates:\n    #define STATE_RESPAWNED            0\n    #define STATE_REVIVED            1\n    #define STATE_INCAPACITATED        2\n    #define STATE_DEAD                3","source":"docblock"}}],"examples":[{"code":["{ [objNull, 1, _x] call BIS_fnc_reviveOnState; } forEach (curatorSelected select 0);"]}],"docblock":{"text":"Author: Jiri Wainar\n\nDescription:\nUsed to execute specific code localy on every client whenever unit's state changes.\n\nParameters:\n    _this select 0: STRING - Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.\n    _this select 1: SCALAR - State.\n    _this select 2: OBJECT - Unit to set the status for.\n\nReturns:\nTrue if successful, false if not.\n\nStates:\n    #define STATE_RESPAWNED            0\n    #define STATE_REVIVED            1\n    #define STATE_INCAPACITATED        2\n    #define STATE_DEAD                3","author":"Jiri Wainar"},"filled_from_docblock":["description","params","returns"]}