animateSource: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
Lou Montana (talk | contribs) m (Text replacement - "\{\{( *)Warning( *)\|" to "{{$1Feature$2|$Warning$2|") |
||
Line 71: | Line 71: | ||
{{Feature|arma3| It is recommended that [[animateSource]] command is used instead of [[animate]] whenever is possible, as it is more efficient and optimized for MP}}<br><br> | {{Feature|arma3| It is recommended that [[animateSource]] command is used instead of [[animate]] whenever is possible, as it is more efficient and optimized for MP}}<br><br> | ||
{{Warning | Mixing [[animateSource]] command with [[animate]] command to animate the same part can lead to unexpected behavior}} | {{Feature |$Warning | Mixing [[animateSource]] command with [[animate]] command to animate the same part can lead to unexpected behavior}} | ||
| object '''animateSource''' [source, phase, speed] | | object '''animateSource''' [source, phase, speed] |
Revision as of 00:19, 7 February 2021
Description
- Description:
- Description needed
- Groups:
- Animations
Syntax
- Syntax:
- Syntax needed
- Parameters:
- object: Object
- [source, phase, speed]: Array
- source: String - common source
- phase: Number - wanted animation phase
- speed: Boolean or Number - When true animation is instant. Since Arma 3 v1.65.138459 Number > 0 is treated as config speed value multiplier
- Return Value:
- Return value needed
Examples
- Example 1:
house animateSource ["Door_1_source", 1, true];
- Example 2:
- Create UGV and manipulate its turret (Currently not possible to do with animate command. See createVehicle/vehicles for reference)
ugv = "B_UGV_01_F" createVehicle (player getRelPos [5, 0]); ugv addAction ["Show Turret", { ugv animateSource ["Turret", 0]; ugv animateSource ["MainTurret", rad 0, true]; ugv animateSource ["MainGun", rad 0, true]; }]; ugv addAction ["Hide Turret", {ugv animateSource ["Turret", 1]}]; ugv addAction ["Turret Left", {ugv animateSource ["MainTurret", rad 90]}]; ugv addAction ["Turret Right", {ugv animateSource ["MainTurret", -rad 90]}]; ugv addAction ["Turret Up", {ugv animateSource ["MainGun", rad 30]}]; ugv addAction ["Turret Down", {ugv animateSource ["MainGun", -rad 20]}];
- Example 3:
barGate animateSource ["Door_1_sound_source", 1]; //Open barGate animateSource ["Door_1_sound_source", 0]; //Close
- Example 4:
- Open/close Bar Gate automatically:
//--- init of the Bar Gate if (isServer) then { _gateTrigger = createTrigger ["EmptyDetector", getPosWorld this, false]; _gateTrigger setVariable ["BarGateObj", this]; _gateTrigger setTriggerActivation ["ANYPLAYER", "PRESENT", true]; _gateTrigger setTriggerArea [5, 25, getDir this, true]; _gateTrigger setTriggerStatements [ "this", "thisTrigger getVariable ""BarGateObj"" animateSource [""Door_1_sound_source"", 1]", "thisTrigger getVariable ""BarGateObj"" animateSource [""Door_1_sound_source"", 0]" ]; };
Additional Information
- See also:
- See also needed
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