animateDoor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Added animationPhase, animationSourcePhase, and animationNames to see also)
No edit summary
Line 67: Line 67:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on June 14, 2016 - 19:52 (UTC)</dd>
<dt class="note">[[User:TheSpic|TheSpic]]</dt>
<dd class="note">
Animations are being synced in MP '''including''' delay<br>
The animation is being shown first on the unit where the vehicle is local.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 20:52, 14 June 2016

Hover & click on the images for description

Description

Description:
Animates a door on a vehicle. Animation is defined in config file in CfgVehicles -> 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: heli animateDoor ["Door_L", 1];
class AnimationSources
{
	class CargoRamp_Open
	{
		source = "user";
		animPeriod = 5;
		initPhase = 0;
	};
	class Door_L
	{
		source = "door";
		animPeriod = 1.6;
	};
};
To animate doors or other sources that have "user" controller, use animate command, or even better, animateSource (recommended). Sources with "hit" controller can be animated with setHitPointDamage command applied to the name contained in hitpoint property. For availability of animation sources and their controller types see: createVehicle/vehicles
Groups:
Uncategorised

Syntax

Syntax:
object animateDoor [doorname, phase, instant]
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:
Nothing

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

Notes

Bottom Section

Posted on June 14, 2016 - 19:52 (UTC)
TheSpic
Animations are being synced in MP including delay
The animation is being shown first on the unit where the vehicle is local.