BIS fnc scriptedMove: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "Script Handle" to "Script Handle") |
Lou Montana (talk | contribs) m (Add Arma 3 "broken" note) |
||
Line 12: | Line 12: | ||
|gr1= Object Manipulation | |gr1= Object Manipulation | ||
|descr= Force a unit to turn towards and walk to | |descr= Force a unit to turn towards and walk to provided destination(s). | ||
{{Feature|arma3|This function is '''broken''' in {{arma3}} as its code relies on [[Arma 2: Multiplayer Framework]].}} | |||
|s1=[unit, waypoints | |s1= [unit, waypoints, code, walkAnim, animLength] call [[BIS_fnc_scriptedMove]] | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
|p2= waypoints: [[Array]] of [[Position | |p2= waypoints: [[Array]] of [[Position]]s | ||
|p3= code: [[Code]] - (Optional, default {{ic|<nowiki>{}</nowiki>}}) code to run after waypoint completion | |p3= code: [[Code]] - (Optional, default {{ic|<nowiki>{}</nowiki>}}) code to run after waypoint completion | ||
Line 24: | Line 25: | ||
|p4= walkAnim: [[String]] - (Optional, default "AmovPercMwlkSnonWnonDf") | |p4= walkAnim: [[String]] - (Optional, default "AmovPercMwlkSnonWnonDf") | ||
|p5= animLength: [[Number]] - (''' | |p5= animLength: [[Number]] - ('''required''' if ''walkAnim'' is defined) distance made by ''walkAnim'' animation | ||
|r1= [[Script Handle]] | |r1= [[Script Handle]] | ||
|x1= < | |x1= <sqf>[myUnit, [getMarkerPos "wp1", getMarkerPos "wp2", getMarkerPos "wp3"]] call BIS_fnc_scriptedMove;</sqf> | ||
|seealso= [[move]], [[setDriveOnPath]] | |seealso= [[move]], [[setDriveOnPath]] | ||
}} | }} |
Revision as of 10:46, 29 April 2022
Description
- Description:
- Force a unit to turn towards and walk to provided destination(s).
- Execution:
- call
- Groups:
- Object Manipulation
Syntax
- Syntax:
- [unit, waypoints, code, walkAnim, animLength] call BIS_fnc_scriptedMove
- Parameters:
- unit: Object
- waypoints: Array of Positions
- code: Code - (Optional, default
{}
) code to run after waypoint completion - walkAnim: String - (Optional, default "AmovPercMwlkSnonWnonDf")
- animLength: Number - (required if walkAnim is defined) distance made by walkAnim animation
- Return Value:
- Script Handle
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