playMove: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")
Line 47: Line 47:
sleep 0.5;
sleep 0.5;
player playMove "AmovPpneMstpSrasWrflDnon"; // player goes prone
player playMove "AmovPpneMstpSrasWrflDnon"; // player goes prone
[[player]] [[playMove]] "amovPknlMstpSrasWrflDnon"; // player gets up on one knee
player [[playMove]] "amovPknlMstpSrasWrflDnon"; // player gets up on one knee
};</code>
};</code>


Line 55: Line 55:
sleep 0.5;
sleep 0.5;
player playMove "AmovPpneMstpSrasWrflDnon"; // player never goes prone
player playMove "AmovPpneMstpSrasWrflDnon"; // player never goes prone
[[player]] [[playMoveNow]] "AmovPknlMstpSrasWrflDnon"; // player goes down on one knee straight away
player [[playMoveNow]] "AmovPknlMstpSrasWrflDnon"; // player goes down on one knee straight away
};</code>
};</code>



Revision as of 14:05, 12 May 2022

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:
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.