BIS fnc ambientAnimCombat: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Complete redo of page)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Play set of ambient animations on given unit AND allows the unit to leave the ambient state and engage enemy or move away. |= 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.
 
Remarks:
* Function controls BIS_fnc_ambientAnim; check that function [Remarks] section for more info of how to use it.
* Unit automatically leaves the animation loop if there is an enemy in 300m he knows about.
 
Parameter(s):
0: OBJECT - unit the anim & gear changes are going to be applied to
1: STRING (optional, default "STAND") - animation set id, describing what the unit's action looks like.
  > "STAND" - standing still, slightly turning to the sides. Needs a rifle!
  > "STAND_IA" - default a3 animations for standing, rifle lowered
  > "SIT_LOW" - sitting on the ground, with weapon.
  > "KNEEL" - kneeling, with weapon.
  > "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.
  > "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
 
4: STRING (optional, default "COMBAT") - behaviour the unit should go to, when freed.
 
Returns:
-
 
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
| [unit, animationset, equipmentlevel, condition, behaviour] call BIS_fnc_ambientAnimCombat;


|p1= |= Parameter 1
|p1= Unit [[Object]] - Unit where the animations will be played |= Parameter 1
|p2= Animation-Set [[String]] - The animationset to play <br>
Possible values are:
*STAND
*STAND_IA
*SIT_LOW
*KNEEL
*LEAN
*WATCH
*WATCH1
*WATCH2
|= Parameter 2
|p3= Equipment-Level [[String]] - The equipment level of the unit <br>
Possible values are:
*NONE
*LIGHT
*MEDIUM
*FULL
*ASIS
*RANDOM
|= Paramter 3
|p4= Condition [[CODE]] or [[String]] - optional - condition that if true frees the unit from the animation loop |= Parameter 4
|p5= Behaviour [[String]] - optional -  behaviour the unit should go to, when freed. Default "COMBAT"


| |= Return value
| None |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>[_unit,"STAND","FULL",{(player distance _this) < 5}] call BIS_fnc_ambientAnimCombat;</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[BIS_fnc_ambientAnim]] |= See also


}}
}}

Revision as of 20:29, 28 July 2016


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.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[unit, animationset, equipmentlevel, condition, behaviour] call BIS_fnc_ambientAnimCombat;
Parameters:
Unit Object - Unit where the animations will be played
Animation-Set String - The animationset to play
Possible values are:
  • STAND
  • STAND_IA
  • SIT_LOW
  • KNEEL
  • LEAN
  • WATCH
  • WATCH1
  • WATCH2
Equipment-Level String - The equipment level of the unit
Possible values are:
  • NONE
  • LIGHT
  • MEDIUM
  • FULL
  • ASIS
  • RANDOM
Condition CODE or String - optional - condition that if true frees the unit from the animation loop
Behaviour String - optional - behaviour the unit should go to, when freed. Default "COMBAT"
Return Value:
None

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

Notes

Bottom Section