animateDoor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "};</syntaxhighlight>" to "}; </syntaxhighlight>")
m (Text replacement - "<br><br> {{Feature" to "{{Feature")
Line 10: Line 10:
|gr1= Animations
|gr1= Animations


| Animates a door on a vehicle. Animation is defined in config file in [[CfgVehicles]] -> [[Model_Config#AnimationSources| AnimationSources]]. Wanted animation phase is set with phase param. This command works only on animation sources with "door" controller. Door_L in the example below can be animated with [[animateDoor]] but not CargoRamp_Open: <tt>heli [[animateDoor]] ["Door_L", 1];</tt><br><br>
| Animates a door on a vehicle. Animation is defined in config file in [[CfgVehicles]] -> [[Model_Config#AnimationSources| AnimationSources]]. Wanted animation phase is set with phase param. This command works only on animation sources with "door" controller. Door_L in the example below can be animated with [[animateDoor]] but not CargoRamp_Open: <tt>heli [[animateDoor]] ["Door_L", 1];</tt>{{Feature | important | [[animateDoor]] <tt>phase</tt> param will be rounded: anything >0.5 will be rounded to 1 and <{{=}}0.5 will be rounded to 0. Therefore it is not possible to open a door half way with this command}}  <br>
{{Feature | important | [[animateDoor]] <tt>phase</tt> param will be rounded: anything >0.5 will be rounded to 1 and <{{=}}0.5 will be rounded to 0. Therefore it is not possible to open a door half way with this command}}  <br>
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
class AnimationSources
class AnimationSources

Revision as of 21:36, 9 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Animations

Syntax

Syntax:
Syntax needed
Parameters:
object: Object
[doorname, phase, instant]: Array
doorname: String
phase: Number
instant: Boolean (When true and phase is either 0 or 1, door will change phase instantaneously)
Return Value:
Return value needed

Examples

Example 1:
Taru animateDoor ["Door_1_source", 1];
Example 2:
Open left front door on Ifrit instantly:Ifrit animateDoor ["Door_LF", 1, true];

Additional Information

See also:
doorPhasesetFaceAnimationanimateanimationPhaseanimateSourceanimationSourcePhaseanimationNames

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