{"name":"BIS_fnc_reviveOnState","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.42"}],"since":{"game":"arma3","name":"Arma 3","version":"1.42"},"arma3_since":"1.42","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Used to execute specific code localy on every client whenever unit's state changes.","syntaxes":[{"syntax":"[] call BIS_fnc_reviveOnState","since":null,"effect":null,"exec":null,"params":[{"name":"param0","type":"String","types":["String"],"optional":false,"default":null,"description":"Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.","since":null,"text":"0: STRING - Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.","source":"docblock"},{"name":"param1","type":"Number","types":["Number"],"optional":false,"default":null,"description":"State.","since":null,"text":"1: SCALAR - State.","source":"docblock"},{"name":"param2","type":"Object","types":["Object"],"optional":false,"default":null,"description":"Unit to set the status for.","since":null,"text":"2: OBJECT - Unit to set the status for.","source":"docblock"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"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":[{"text":"```sqf\n{ [objNull, 1, _x] call BIS_fnc_reviveOnState; } forEach (curatorSelected select 0);\n```","code":["{ [objNull, 1, _x] call BIS_fnc_reviveOnState; } forEach (curatorSelected select 0);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":[],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Revive","Functions","Introduced with Arma 3 version 1.42"],"docblock":{"author":"Jiri Wainar","description":"Used to execute specific code localy on every client whenever unit's state changes.","params":[{"index":0,"name":null,"types":["String"],"optional":false,"default":null,"description":"Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE.","text":"STRING - Variable that carries the state value over the network, defined by macro VAR_TRANSFER_STATE."},{"index":1,"name":null,"types":["Number"],"optional":false,"default":null,"description":"State.","text":"SCALAR - State."},{"index":2,"name":null,"types":["Object"],"optional":false,"default":null,"description":"Unit to set the status for.","text":"OBJECT - Unit to set the status for."}],"returns":{"types":["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"},"examples":[],"syntax":null,"execution":null,"notes":null,"requirements":null,"meta":{},"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"},"filled_from_docblock":["description","params","returns"]}