animateDoor: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
BrettMayson (talk | contribs) mNo edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 32: | Line 32: | ||
|p1= object: [[Object]] | |p1= object: [[Object]] | ||
|p2= | |p2= doorname: [[String]] | ||
|p3= | |p3= phase: [[Number]] | ||
|p4= | |p4= instant: [[Boolean]] - (Optional, default [[false]]) when [[true]] and phase is either 0 or 1, door will change phase instantaneously | ||
| | |r1= [[Nothing]] | ||
| | |x1= <sqf>Taru animateDoor ["Door_1_source", 1];</sqf> | ||
|x2= Open left front door on Ifrit instantly: | |||
|x2= Open left front door on Ifrit instantly:< | <sqf>Ifrit animateDoor ["Door_LF", 1, true];</sqf> | ||
|seealso= [[doorPhase]] [[setFaceAnimation]] [[animate]] [[animationPhase]] [[animateSource]] [[animationSourcePhase]] | |seealso= [[doorPhase]] [[setFaceAnimation]] [[animate]] [[animationPhase]] [[animateSource]] [[animationSourcePhase]] [[animationNames]] | ||
}} | }} |
Latest revision as of 21:03, 28 September 2023
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: Arma 3: 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: String
- phase: Number
- instant: Boolean - (Optional, default false) 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:
Additional Information
- See also:
- doorPhase setFaceAnimation animate animationPhase animateSource animationSourcePhase animationNames
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