playMove: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(78 intermediate revisions by 18 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|PLAYMOVE]]
{{RV|type=command
[[Category:Scripting Commands OFP 1.96|PLAYMOVE]]
[[Category:Scripting Commands OFP 1.46|PLAYMOVE]]
[[Category:Scripting Commands ArmA|PLAYMOVE]]


|game1= ofp
|version1= 1.00


<h2 style="color:#000066">''solider '''''playMove ''moveName'''''</h2>
|game2= ofpe
|version2= 1.00


|game3= arma1
|version3= 1.00


'''Operand types:'''
|game4= arma2
|version4= 1.00


'''soldier:''' [[Object]]
|game5= arma2oa
|version5= 1.50


'''moveName:''' [[String]]
|game6= tkoh
|version6= 1.00


'''Type of returned value:'''
|game7= arma3
|version7= 0.50


[[Nothing]]
|arg= local


'''Description:'''
|eff= global


When used on person, smooth transition to given move will be done.
|gr1= Animations


|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 {{Link|#Example 2}}).
{{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.}}


'''Example:'''
|s1= unitName [[playMove]] moveName


soldierOne '''playMove''' "Stand"
|p1= unitName: [[Object]]


|p2= moveName: [[String]]


'''Comments'''
|r1= [[Nothing]]


For an immediate transition use [[switchMove]].
|x1= <sqf>soldierOne playMove "Stand";</sqf>
 
|x2= <sqf>
player switchMove "AmovPercMstpSrasWrflDnon";
0 spawn
{
sleep 0.5;
player playMove "AmovPpneMstpSrasWrflDnon"; // player goes prone
player playMove "amovPknlMstpSrasWrflDnon"; // player gets up on one knee
};
</sqf>
 
|x3= <sqf>
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
};
</sqf>
 
|seealso= [[playMoveNow]] [[switchMove]] [[playAction]] [[playActionNow]]
}}
 
{{Note
|user= Macguba
|timestamp= 20060416023900
|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.
}}

Latest revision as of 19:42, 3 September 2024

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.
A transition is only possible if the current and provided animations have the correct relationship configuration.
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"; 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:
playMoveNow 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
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.