animationSourcePhase: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[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 \("serv...)
m (Text replacement - "{{HashLink" to "{{Link")
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command


| arma3
|game1= arma3
|1.58
|version1= 1.58


|gr1= Animations
|gr1= Animations


| Returns current animation phase of given source. Similar to [[animationPhase]] or [[doorPhase]] but designed to complement [[animateSource]]. This command could be used to obtain relative turret direction and gun elevation on a vehicle (see Example 2)
|descr= Returns current animation phase of given source. Similar to [[animationPhase]] or [[doorPhase]] but designed to complement [[animateSource]]. This command could be used to obtain relative turret direction and gun elevation on a vehicle (see {{Link|#Example 2}}).


| object '''animationSourcePhase''' source
|s1= object [[animationSourcePhase]] source


|p1= object: [[Object]]
|p1= object: [[Object]]
Line 14: Line 14:
|p2= source: [[String]]
|p2= source: [[String]]


| [[Number]]
|r1= [[Number]]


|x1= <sqf>private _phase = house animationSourcePhase "Door_1_source";</sqf>


|x1= <code>_phase = house [[animationSourcePhase]] "Door_1_source";</code>
|x2= <sqf>
|x2= <code>_mainturretDirection = [[deg]] (_marshall [[animationSourcePhase]] "mainturret"); // relative to Marshall direction
private _mainturretDirection = deg (_marshall animationSourcePhase "mainturret"); // relative to Marshall direction
_maingunElevation = [[deg]] (_marshall [[animationSourcePhase]] "maingun");
private _maingunElevation = deg (_marshall animationSourcePhase "maingun");
_obsturretDirection = [[deg]] (_marshall [[animationSourcePhase]] "obsturret"); // relative to main turret direction
private _obsturretDirection = deg (_marshall animationSourcePhase "obsturret"); // relative to main turret direction
_obsgunElevation = [[deg]] (_marshall [[animationSourcePhase]] "obsgun");</code>
private _obsgunElevation = deg (_marshall animationSourcePhase "obsgun");
</sqf>


 
|seealso= [[animateSource]] [[animationNames]] [[animate]] [[animationPhase]] [[animateDoor]] [[doorPhase]]
| [[animateSource]], [[animationNames]], [[animate]], [[animationPhase]], [[animateDoor]], [[doorPhase]]
 
|  |MPBEHAVIOUR=
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 18:43, 4 January 2023

Hover & click on the images for description

Description

Description:
Returns current animation phase of given source. Similar to animationPhase or doorPhase but designed to complement animateSource. This command could be used to obtain relative turret direction and gun elevation on a vehicle (see Example 2).
Groups:
Animations

Syntax

Syntax:
object animationSourcePhase source
Parameters:
object: Object
source: String
Return Value:
Number

Examples

Example 1:
private _phase = house animationSourcePhase "Door_1_source";
Example 2:
private _mainturretDirection = deg (_marshall animationSourcePhase "mainturret"); // relative to Marshall direction private _maingunElevation = deg (_marshall animationSourcePhase "maingun"); private _obsturretDirection = deg (_marshall animationSourcePhase "obsturret"); // relative to main turret direction private _obsgunElevation = deg (_marshall animationSourcePhase "obsgun");

Additional Information

See also:
animateSource animationNames animate animationPhase animateDoor doorPhase

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