animateDoor: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) 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...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|0.50 | |0.50 | ||
Line 9: | Line 9: | ||
|arg= global|Multiplayer Arguments= | |arg= global|Multiplayer Arguments= | ||
|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><br><br> | ||
Line 28: | Line 28: | ||
}; | }; | ||
};</syntaxhighlight> | };</syntaxhighlight> | ||
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]] | 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]] | ||
| object '''animateDoor''' [doorname, phase, instant] | | object '''animateDoor''' [doorname, phase, instant] | ||
|p1= object: [[Object]] | |p1= object: [[Object]] | ||
|p2= [doorname, phase, instant]: [[Array]] | |p2= [doorname, phase, instant]: [[Array]] | ||
|p3= doorname: [[String]] | |p3= doorname: [[String]] | ||
|p4= phase: [[Number]] | |p4= phase: [[Number]] | ||
|p5= instant: [[Boolean]] (When [[true]] and phase is either 0 or 1, door will change phase instantaneously) | |p5= instant: [[Boolean]] (When [[true]] and phase is either 0 or 1, door will change phase instantaneously) | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>Taru [[animateDoor]] ["Door_1_source", 1];</code> | |x1= <code>Taru [[animateDoor]] ["Door_1_source", 1];</code> | ||
|x2= Open left front door on Ifrit instantly:<code>Ifrit [[animateDoor]] ["Door_LF", 1, [[true]]];</code> | |x2= Open left front door on Ifrit instantly:<code>Ifrit [[animateDoor]] ["Door_LF", 1, [[true]]];</code> | ||
| [[doorPhase]], [[setFaceAnimation]], [[animate]], [[animationPhase]], [[animateSource]], [[animationSourcePhase]], [[animationNames]] | | [[doorPhase]], [[setFaceAnimation]], [[animate]], [[animationPhase]], [[animateSource]], [[animationSourcePhase]], [[animationNames]] | ||
| |MPBEHAVIOUR= | | |MPBEHAVIOUR= |
Revision as of 00:02, 18 January 2021
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];
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/vehiclesclass AnimationSources { class CargoRamp_Open { source = "user"; animPeriod = 5; initPhase = 0; }; class Door_L { source = "door"; animPeriod = 1.6; }; };
- Groups:
- Animations
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