BIS fnc scriptedMove: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 26: | Line 26: | ||
|p3= code: [[Code]] or [[Array]] - (Optional, default {{ic|<nowiki>{}</nowiki>}}) code to run after each waypoint completion. Format {code} or <nowiki>[</nowiki>[params], {code}] | |p3= code: [[Code]] or [[Array]] - (Optional, default {{ic|<nowiki>{}</nowiki>}}) code to run after each waypoint completion. Format {code} or <nowiki>[</nowiki>[params], {code}] | ||
|p4= walkAnim: [[String]] - (Optional, default "AmovPercMwlkSnonWnonDf") | |p4= walkAnim: [[String]] - (Optional, default "AmovPercMwlkSnonWnonDf") walking animation to be played in a loop | ||
|p5= completionRadius: [[Number]] - (Optional, default 0.5) how far from waypoint center to consider waypoint completion | |p5= completionRadius: [[Number]] - (Optional, default 0.5) how far from waypoint center to consider waypoint completion. Global value. The completionRadius given with individual waypoint position overrides global value. | ||
|p6= endAnim: [[Number]] - (Optional, default [[animationState]] of the unit prior to function execution) when unit reaches last point, this is the animation to be played immediately. Use "" to let last walkAnim run in full. | |p6= endAnim: [[Number]] - (Optional, default [[animationState]] of the unit prior to function execution) when unit reaches last point, this is the animation to be played immediately. Use "" to let last walkAnim run in full. | ||
Revision as of 12:56, 1 May 2022
Description
- Description:
- Forces a unit to turn towards and walk to provided destination(s). Will not work on player.
- Execution:
- call
- Groups:
- Object Manipulation
Syntax
- Syntax:
- [unit, waypoints, code, walkAnim, completionRadius, endAnim] call BIS_fnc_scriptedMove
- Parameters:
- unit: Object - unit of the class "Man"
- waypoints: Array of Positions in format [pos1, pos2,...] or [[pos1, completionRadius1], [pos2, completionRadius2],...]
- code: Code or Array - (Optional, default
{}
) code to run after each waypoint completion. Format {code} or [[params], {code}] - walkAnim: String - (Optional, default "AmovPercMwlkSnonWnonDf") walking animation to be played in a loop
- completionRadius: Number - (Optional, default 0.5) how far from waypoint center to consider waypoint completion. Global value. The completionRadius given with individual waypoint position overrides global value.
- endAnim: Number - (Optional, default animationState of the unit prior to function execution) when unit reaches last point, this is the animation to be played immediately. Use "" to let last walkAnim run in full.
- Return Value:
- Script Handle or String or Nothing - depends on execution (local/remote/error);
Examples
- Example 1:
Additional Information
- See also:
- movesetDriveOnPath
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