animationSourcePhase: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Bot: Replacing category Scripting Commands Arma 3 with Arma 3: Scripting Commands)
m (template:command argument fix)
(5 intermediate revisions by 2 users not shown)
Line 6: Line 6:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Returns current animation phase of given source. Similar to [[animationPhase]] or [[doorPhase]] but designed to complement [[animateSource]]. |= 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) |DESCRIPTION=
____________________________________________________________________________________________
____________________________________________________________________________________________


| object '''animationSourcePhase''' source |= Syntax
| object '''animationSourcePhase''' source |SYNTAX=


|p1= object: [[Object]]  |= PARAMETER1
|p1= object: [[Object]]  |PARAMETER1=  


|p2= source: [[String]]  |= PARAMETER2
|p2= source: [[String]]  |PARAMETER2=  


| [[Number]] |= RETURNVALUE
| [[Number]] |RETURNVALUE=  




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


____________________________________________________________________________________________
____________________________________________________________________________________________


| [[animateSource]], [[animationNames]], [[animate]], [[animationPhase]], [[animateDoor]], [[doorPhase]] |= SEEALSO
| [[animateSource]], [[animationNames]], [[animate]], [[animationPhase]], [[animateDoor]], [[doorPhase]] |SEEALSO=  


|  |= MPBEHAVIOUR
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
____________________________________________________________________________________________
}}
}}
Line 36: Line 40:


<h3 style='display:none'>Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>
 
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Arma 3: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Arma 3: Scripting Commands]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 12:25, 7 April 2019

-wrong parameter ("A3") defined!-[[:Category:Introduced with A3 version 1.58|1.58]]
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:
Uncategorised

Syntax

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

Examples

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

Additional Information

See also:
animateSourceanimationNamesanimateanimationPhaseanimateDoordoorPhase

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

[[Category:Introduced with A3 version 1.58]][[ Category: A3: New Scripting Commands | ANIMATIONSOURCEPHASE]][[ Category: A3: Scripting Commands | ANIMATIONSOURCEPHASE]]

Notes

Bottom Section