{"name":"BIS_fnc_ambientAnimCombat","title":"BIS fnc ambientAnimCombat","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_ambientAnimCombat","revid":349315,"updated":"2023-11-08T14:52:25Z","groups":["Ambient"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Play set of ambient animations on given unit AND allows the unit to leave the ambient state and engage enemy or move away.\n\n> [!NOTE]\n> Animations can be cancelled using `_unit call BIS_fnc_ambientAnim__terminate`.","syntaxes":[{"syntax":"[unit, animationSet, equipmentLevel, condition, behaviour] call BIS_fnc_ambientAnimCombat","params":[{"name":"unit","type":"Object","description":"unit where the animations will be played","type_expr":"Object"},{"name":"animationSet","type":"String","optional":true,"default":"\"STAND\"","description":"the animation set to play. Possible values are:\n\n- \"STAND\"\n- \"STAND_IA\"\n- \"SIT_LOW\"\n- \"KNEEL\"\n- \"LEAN\"\n- \"WATCH\"\n- \"WATCH1\"\n- \"WATCH2\"","type_expr":"String","text":"animationSet: String - (Optional, default \"STAND\") the animation set to play. Possible values are:\n\n- \"STAND\"\n- \"STAND_IA\"\n- \"SIT_LOW\"\n- \"KNEEL\"\n- \"LEAN\"\n- \"WATCH\"\n- \"WATCH1\"\n- \"WATCH2\""},{"name":"equipmentLevel","type":"String","optional":true,"default":"\"RANDOM\"","description":"the equipment level of the unit. Possible values are:\n\n- \"NONE\"\n- \"LIGHT\"\n- \"MEDIUM\"\n- \"FULL\"\n- \"ASIS\"\n- \"RANDOM\"","type_expr":"String","text":"equipmentLevel: String - (Optional, default \"RANDOM\") the equipment level of the unit. Possible values are:\n\n- \"NONE\"\n- \"LIGHT\"\n- \"MEDIUM\"\n- \"FULL\"\n- \"ASIS\"\n- \"RANDOM\""},{"name":"condition","type":"Code or String","optional":true,"default":"`{ false }`","description":"condition that if true frees the unit from the animation loop","type_expr":"Code | String","text":"condition: Code or String - (Optional, default `{ false }`) condition that if true frees the unit from the animation loop"},{"name":"behaviour","type":"String","optional":true,"default":"\"COMBAT\"","description":"behaviour the unit should go to, when freed. Default \"COMBAT\"","type_expr":"String","text":"behaviour: String - (Optional, default \"COMBAT\") behaviour the unit should go to, when freed. Default \"COMBAT\""}],"returns":{"type":"Nothing","type_expr":"Nothing"}}],"examples":[{"code":["[_unit, \"STAND\", \"FULL\", { (player distance _this) < 5 }] call BIS_fnc_ambientAnimCombat;"]}],"see_also":["BIS_fnc_ambientAnim"]}