BIS fnc ambientAnimCombat: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *U([a-z ])" to "$1 - u$2")
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Ambient


|1.00|= Game version
|descr= Play set of ambient animations on given unit AND allows the unit to leave the ambient state and engage enemy or move away.
____________________________________________________________________________________________
{{Feature|informative|Animations can be cancelled using <sqf inline>_unit call BIS_fnc_ambientAnim__terminate</sqf>.}}


| <pre>/*
|s1= [unit, animationSet, equipmentLevel, condition, behaviour] call [[BIS_fnc_ambientAnimCombat]]


Description:
|p1= unit: [[Object]] - unit where the animations will be played
Play set of ambient animations on given unit AND allows the unit to leave the ambient state and engage enemy or move away.


Remarks:
|p2= animationSet: [[String]] - (Optional, default "STAND") the animation set to play. Possible values are:
* Function controls BIS_fnc_ambientAnim; check that function [Remarks] section for more info of how to use it.
* "STAND"
* Unit automatically leaves the animation loop if there is an enemy in 300m he knows about.
* "STAND_IA"
* "SIT_LOW"
* "KNEEL"
* "LEAN"
* "WATCH"
* "WATCH1"
* "WATCH2"


Parameter(s):
|p3= equipmentLevel: [[String]] - (Optional, default "RANDOM") the equipment level of the unit. Possible values are:
0: OBJECT - unit the anim & gear changes are going to be applied to
* "NONE"
1: STRING (optional, default "STAND") - animation set id, describing what the unit's action looks like.
* "LIGHT"
  > "STAND" - standing still, slightly turning to the sides. Needs a rifle!
* "MEDIUM"
  > "STAND_IA" - default a3 animations for standing, rifle lowered
* "FULL"
  > "SIT_LOW" - sitting on the ground, with weapon.
* "ASIS"
  > "KNEEL" - kneeling, with weapon.
* "RANDOM"
  > "LEAN" - standing while leaning (on wall)
  > "WATCH"/"WATCH1"/"WATCH2" - standing and turning around


2: STRING (optional, default "RANDOM") - equipment level id, describing how heavily is the unit equipped.
|p4= condition: [[Code]] or [[String]] - (Optional, default <sqf inline>{ false }</sqf>) condition that if true frees the unit from the animation loop
  > "NONE"  - no goggles, headgear, vest, weapon
  > "LIGHT"  - no goggles, headgear, vest
  > "MEDIUM" - no goggles, headgear
  > "FULL"  - no goggles
  > "ASIS" (default) - no touches to the gear
  > "RANDOM" - gear is randomized according to the animation set


3: CODE or STRING (optional, default {false}) - condition that if true frees the unit from the animation loop
|p5= behaviour: [[String]] - (Optional, default "COMBAT") behaviour the unit should go to, when freed. Default "COMBAT"


4: STRING (optional, default "COMBAT") - behaviour the unit should go to, when freed.
|r1= [[Nothing]]


Returns:
|x1= <sqf>[_unit, "STAND", "FULL", { (player distance _this) < 5 }] call BIS_fnc_ambientAnimCombat;</sqf>
-
 
Example:
[this,"STAND","FULL",{(player distance _this) < 5}] call BIS_fnc_ambientAnimCombat;
*/
 
//do the immediate operations ----------------------------------------------------------------------
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_ambientAnimCombat]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[BIS_fnc_ambientAnim]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Ambient|{{uc:ambientAnimCombat}}]]
[[Category:Functions|{{uc:ambientAnimCombat}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:ambientAnimCombat}}]]

Latest revision as of 15:52, 8 November 2023

Hover & click on the images for description

Description

Description:
Play set of ambient animations on given unit AND allows the unit to leave the ambient state and engage enemy or move away.
Animations can be cancelled using _unit call BIS_fnc_ambientAnim__terminate.
Execution:
call
Groups:
Ambient

Syntax

Syntax:
[unit, animationSet, equipmentLevel, condition, behaviour] call BIS_fnc_ambientAnimCombat
Parameters:
unit: Object - unit where the animations will be played
animationSet: String - (Optional, default "STAND") the animation set to play. Possible values are:
  • "STAND"
  • "STAND_IA"
  • "SIT_LOW"
  • "KNEEL"
  • "LEAN"
  • "WATCH"
  • "WATCH1"
  • "WATCH2"
equipmentLevel: String - (Optional, default "RANDOM") the equipment level of the unit. Possible values are:
  • "NONE"
  • "LIGHT"
  • "MEDIUM"
  • "FULL"
  • "ASIS"
  • "RANDOM"
condition: Code or String - (Optional, default { false }) condition that if true frees the unit from the animation loop
behaviour: String - (Optional, default "COMBAT") behaviour the unit should go to, when freed. Default "COMBAT"
Return Value:
Nothing

Examples

Example 1:
[_unit, "STAND", "FULL", { (player distance _this) < 5 }] call BIS_fnc_ambientAnimCombat;

Additional Information

See also:
BIS_fnc_ambientAnim

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note