playMoveNow: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *arma2 * * *\| *([0-1]\.[0-9]{2}) * \|game2" to "|game1= arma2 |version1= $1 |game2")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(25 intermediate revisions by 3 users not shown)
Line 20: Line 20:


|descr= When used on a person,a smooth transition to the given move will be initiated, but all previous playMove are discarded. <br>
|descr= When used on a person,a smooth transition to the given move will be initiated, but all previous playMove are discarded. <br>
The difference between [[playMove]] and [[playMoveNow]] is that [[playMove]] adds another move to the move queue, while [[playMoveNow]] replaces the whole move queue with new move (see [[#Examples|Example 2]]).
The difference between [[playMove]] and [[playMoveNow]] is that [[playMove]] adds another move to the move queue, while [[playMoveNow]] replaces the whole move queue with new move (see {{Link|#Example 2}}).
{{Feature | Informative | see [[:Category:Moves]] for respective games animations.}}
{{Feature|informative|see [[:Category:Moves]] for respective games animations.}}
{{Feature|important|A transition is only possible if the current and provided animations have the correct relationship configuration.}}


|s1= soldier [[playMoveNow]] moveName
|s1= soldier [[playMoveNow]] moveName


|p1= soldier: [[Object]]
|p1= soldier: [[Object]]
Line 31: Line 32:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[[player]] [[playMoveNow]] "AmovPercMevaSlowWrflDf"</code>
|x1= <sqf>player playMoveNow "AmovPercMevaSlowWrflDf";</sqf>
|x2= <code>[[player]] [[switchMove]] "AmovPercMstpSrasWrflDnon";  
|x2= <sqf>
[] [[spawn]]
player switchMove "AmovPercMstpSrasWrflDnon";
0 spawn  
{
{
[[sleep]] 0.5;  
sleep 0.5;
[[player]] [[playMove]] "AmovPpneMstpSrasWrflDnon"; {{cc|player goes prone}}
player playMove "AmovPpneMstpSrasWrflDnon"; // player goes prone
[[player]] [[playMove]] "amovPknlMstpSrasWrflDnon"; {{cc|player gets up on one knee}}
player playMove "amovPknlMstpSrasWrflDnon"; // player gets up on one knee
};</code>
};
<code>[[player]] [[switchMove]] "amovpercmstpsraswrfldnon";
</sqf>
[] [[spawn]]
|x3= <sqf>
player switchMove "amovpercmstpsraswrfldnon";
0 spawn
{
{
[[sleep]] 0.5;  
sleep 0.5;
[[player]] [[playMove]] "AmovPpneMstpSrasWrflDnon"; {{cc|player never goes prone}}
player playMove "AmovPpneMstpSrasWrflDnon"; // player never goes prone
[[player]] [[playMoveNow]] "AmovPknlMstpSrasWrflDnon"; {{cc|player goes down on one knee straight away}}
player playMoveNow "AmovPknlMstpSrasWrflDnon"; // player goes down on one knee straight away
};</code>
};
</sqf>


|seealso= [[playMove]], [[switchMove]], [[playAction]], [[playActionNow]]
|seealso= [[playMove]] [[switchMove]] [[playAction]] [[playActionNow]]
}}
}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 19:42, 3 September 2024

Hover & click on the images for description

Description

Description:
When used on a person,a smooth transition to the given move will be initiated, but all previous playMove are discarded.
The difference between playMove and playMoveNow is that playMove adds another move to the move queue, while playMoveNow replaces the whole move queue with new move (see Example 2).
see Category:Moves for respective games animations.
A transition is only possible if the current and provided animations have the correct relationship configuration.
Groups:
Animations

Syntax

Syntax:
soldier playMoveNow moveName
Parameters:
soldier: Object
moveName: String
Return Value:
Nothing

Examples

Example 1:
player playMoveNow "AmovPercMevaSlowWrflDf";
Example 2:
player switchMove "AmovPercMstpSrasWrflDnon"; 0 spawn { sleep 0.5; player playMove "AmovPpneMstpSrasWrflDnon"; // player goes prone player playMove "amovPknlMstpSrasWrflDnon"; // player gets up on one knee };
Example 3:
player switchMove "amovpercmstpsraswrfldnon"; 0 spawn { sleep 0.5; player playMove "AmovPpneMstpSrasWrflDnon"; // player never goes prone player playMoveNow "AmovPknlMstpSrasWrflDnon"; // player goes down on one knee straight away };

Additional Information

See also:
playMove switchMove playAction playActionNow

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