BIS fnc ambientAnim: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1 = Ambient | |gr1 = Ambient | ||
| Play set of ambient animations on given unit. If the unit should react to combat, use [[BIS_fnc_ambientAnimCombat]] instead. | | Play set of ambient animations on given unit. If the unit should react to combat, use [[BIS_fnc_ambientAnimCombat]] instead. | ||
{{Informative | Animations can be cancelled using {{Inline code|_unit [[call]] '''BIS_fnc_ambientAnim__terminate'''}}.}} | {{Informative | Animations can be cancelled using {{Inline code|_unit [[call]] '''BIS_fnc_ambientAnim__terminate'''}}.}} | ||
| [unit, animationSet, equipmentLevel, snapTo, interpolate, attachToLogic] call [[BIS_fnc_ambientAnim]] | | [unit, animationSet, equipmentLevel, snapTo, interpolate, attachToLogic] call [[BIS_fnc_ambientAnim]] | ||
|p1= unit: [[Object]] - unit that will play the animations | |p1= unit: [[Object]] - unit that will play the animations | ||
|p2= animationSet: [[String]] - the animation set to play. Possible values: | |p2= animationSet: [[String]] - the animation set to play. Possible values: | ||
Line 58: | Line 58: | ||
* BRIEFING_POINT_RIGHT | * BRIEFING_POINT_RIGHT | ||
* BRIEFING_POINT_TABLE | * BRIEFING_POINT_TABLE | ||
{{!}}} | {{!}}} | ||
|p3= equipmentLevel: [[String]] - the equipment level of the unit. Possible values: | |p3= equipmentLevel: [[String]] - the equipment level of the unit. Possible values: | ||
Line 66: | Line 66: | ||
* FULL | * FULL | ||
* ASIS | * ASIS | ||
* RANDOM | * RANDOM | ||
|p4= snapTo: [[Object]] - (Optional, default [[objNull]]) the object where the unit will be snapped to | |p4= snapTo: [[Object]] - (Optional, default [[objNull]]) the object where the unit will be snapped to | ||
|p5= interpolate: [[Boolean]] - (Optional, default [[false]]) should try to interpolate into the ambient animation. Works only for some default stances | |p5= interpolate: [[Boolean]] - (Optional, default [[false]]) should try to interpolate into the ambient animation. Works only for some default stances | ||
|p6= attachToLogic: [[Boolean]] - (Optional, default [[true]]) [[true]] to [[attachTo|attach]] the unit to the created logic object, forcing it in one position | |p6= attachToLogic: [[Boolean]] - (Optional, default [[true]]) [[true]] to [[attachTo|attach]] the unit to the created logic object, forcing it in one position | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code><nowiki>[</nowiki>[[player]], "STAND1", "ASIS"] [[call]] [[BIS_fnc_ambientAnim]];</code> | |x1= <code><nowiki>[</nowiki>[[player]], "STAND1", "ASIS"] [[call]] [[BIS_fnc_ambientAnim]];</code> | ||
|x2= <code>{{cc|will search for a chair within 2 meters around the unit and will place the unit on it}} | |x2= <code>{{cc|will search for a chair within 2 meters around the unit and will place the unit on it}} | ||
[_unit, "SIT", "NONE"] [[call]] [[BIS_fnc_ambientAnim]];</code> | [_unit, "SIT", "NONE"] [[call]] [[BIS_fnc_ambientAnim]];</code> | ||
| [[BIS_fnc_ambientAnimCombat]], [[BIS_fnc_ambientAnimGetParams]] | | [[BIS_fnc_ambientAnimCombat]], [[BIS_fnc_ambientAnimGetParams]] | ||
}} | }} | ||
Revision as of 22:39, 17 January 2021
Description
- Description:
- Play set of ambient animations on given unit. If the unit should react to combat, use BIS_fnc_ambientAnimCombat instead.
- Execution:
- call
- Groups:
- Ambient
Syntax
- Syntax:
- [unit, animationSet, equipmentLevel, snapTo, interpolate, attachToLogic] call BIS_fnc_ambientAnim
- Parameters:
- unit: Object - unit that will play the animations
- animationSet: String - the animation set to play. Possible values:
some values are missing due to duplicate results, e.g "STAND" does the same as "STAND1" - STAND1
- STAND2
- STAND_U1
- STAND_U2
- STAND_U3
- WATCH
- WATCH2
- GUARD
- LISTEN_BRIEFING
- LEAN_ON_TABLE
- LEAN
- SIT_AT_TABLE
- SIT1
- SIT
- SIT3
- SIT_U1
- SIT_U2
- SIT_U3
- SIT_HIGH1
- SIT_HIGH
- SIT_LOW
- SIT_LOW_U
- SIT_SAD1
- SIT_SAD2
- KNEEL
- REPAIR_VEH_PRONE
- REPAIR_VEH_KNEEL
- REPAIR_VEH_STAND
- PRONE_INJURED_U1
- PRONE_INJURED_U2
- PRONE_INJURED
- KNEEL_TREAT
- KNEEL_TREAT2
- BRIEFING
- BRIEFING_POINT_LEFT
- BRIEFING_POINT_RIGHT
- BRIEFING_POINT_TABLE
- equipmentLevel: String - the equipment level of the unit. Possible values:
- NONE
- LIGHT
- MEDIUM
- FULL
- ASIS
- RANDOM
- snapTo: Object - (Optional, default objNull) the object where the unit will be snapped to
- interpolate: Boolean - (Optional, default false) should try to interpolate into the ambient animation. Works only for some default stances
- attachToLogic: Boolean - (Optional, default true) true to attach the unit to the created logic object, forcing it in one position
- Return Value:
- Nothing
Examples
- Example 1:
[player, "STAND1", "ASIS"] call BIS_fnc_ambientAnim;
- Example 2:
// will search for a chair within 2 meters around the unit and will place the unit on it [_unit, "SIT", "NONE"] call BIS_fnc_ambientAnim;
Additional Information
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
- Posted on February 19, 2016 - 04:24
- Pierre MGI
- In 3den editor, place a blufor unit (B_soldier_A_F) near a camping chair (land_campingChair_V2_F).
In init field of the unit:
[this, "SIT2"] call BIS_fnc_ambientAnim;
When this unit is aware of a threat, he will quit the "ambient animation" and will able to return fire.
0 = this spawn {waitUntil {behaviour _this == "combat"}; _this call BIS_fnc_ambientAnim__terminate;}
Note: BIS_fnc_ambientAnimCombat doesn't need this script but the list of animations is limited. - Posted on August 08, 2016 - 01:37
- Pierre MGI
- To make this command working in MP (hosted server tested)
[this, "SIT2"] call BIS_fnc_ambientAnim; // wrong! the first JIP will throw the unit to position [0,0,0] if (isServer) then { [this, "SIT2"] call BIS_fnc_ambientAnim; }; // wrong! only player located on server will see the animation if (local this) then { [this, "SIT2"] call BIS_fnc_ambientAnim; }; // OK, best way if (isServer) then { [[this, "SIT2"], BIS_fnc_ambientAnim] remoteExec ["call"]; }; // OK
Bottom Section
- Posted on September 11, 2016 - 16:33 (UTC)
- Icaruk
-
Be careful using this function multiple times on MP, it creates a Logic using createUnit (which is global).
If you use it on 20 units, 20 additional logics will be created.