animateDoor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(description)
mNo edit summary
Line 11: Line 11:
____________________________________________________________________________________________
____________________________________________________________________________________________


| 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 sources defined as "door". Door_L in the example below can be animated with animateDoor but not CargoRamp_Open: <tt>heli [[animateDoor]] ["Door_L", 1];</tt>
| 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 sources defined as "door". Door_L in the example below can be animated with [[animateDoor]] but not CargoRamp_Open: <tt>heli [[animateDoor]] ["Door_L", 1];</tt>
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
class AnimationSources
class AnimationSources

Revision as of 20:31, 8 March 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 sources defined as "door". 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 defined as "user" source, use animate command, or even better, animateSource (recommended). Sources marked "hit" can be animated with setHitPointDamage command applied to the name contained in hitpoint property. For availability of animation sources and their type see: createVehicle/vehicles
Groups:
Uncategorised

Syntax

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

Examples

Example 1:
heli animateDoor ["doors1", 1, false];
Example 2:
Open left front door on Ifrit instantly:ifrit animateDoor ["Door_LF", 1, true];

Additional Information

See also:
doorPhaseanimateanimationPhasesetFaceAnimation

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