playMove: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[#Examples\|Example ([0-9])\]\]" to "{{HashLink|#Example $1}}")
m (Some wiki formatting)
Line 30: Line 30:
|descr= When used on a person, smooth transition to given move will be done.<br>
|descr= When used on a person, smooth transition to given move will be done.<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 {{HashLink|#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 {{HashLink|#Example 2}}).
{{Feature | Informative | see [[:Category:Moves]] for respective games animations.}}
{{Feature|informative|see [[:Category:Moves]] for respective games animations.}}


|s1= unitName [[playMove]] moveName
|s1= unitName [[playMove]] moveName


|p1= unitName: [[Object]]
|p1= unitName: [[Object]]
|p2= moveName: [[String]]
|p2= moveName: [[String]]


Line 40: Line 41:


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


Line 58: Line 61:
}}
}}


<dl class="command_description">
{{Note
 
|user= Macguba
<dt class="note">Unknown</dt>
|timestamp= 20060416023900
<dd class="note">For an immediate transition use [[switchMove]]. This command must be executed after mission start. If you place it into init.sqs / init.sqf or in the Init field of some unit, it will not work. Just add a little delay (~0.001) and then place the command.
|text= For an immediate transition use [[switchMove]]. This command must be executed after mission start. If you place it into init.sqs / init.sqf or in the Init field of some unit, it will not work. Just add a little delay (~0.001) and then place the command.
 
}}
</dl>

Revision as of 18:51, 25 November 2021

Hover & click on the images for description

Description

Description:
When used on a person, smooth transition to given move will be done.
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.
Groups:
Animations

Syntax

Syntax:
unitName playMove moveName
Parameters:
unitName: Object
moveName: String
Return Value:
Nothing

Examples

Example 1:
soldierOne playMove "Stand";
Example 2:
player switchMove "AmovPercMstpSrasWrflDnon"; [] spawn { sleep 0.5; player playMove "AmovPpneMstpSrasWrflDnon"; // player goes prone player playMove "amovPknlMstpSrasWrflDnon"; // player gets up on one knee }; player switchMove "AmovPercMstpSrasWrflDnon"; [] 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:
playMoveNowswitchMoveplayActionplayActionNow

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
Macguba - c
Posted on Apr 16, 2006 - 02:39 (UTC)
For an immediate transition use switchMove. This command must be executed after mission start. If you place it into init.sqs / init.sqf or in the Init field of some unit, it will not work. Just add a little delay (~0.001) and then place the command.