setDriveOnPath: Difference between revisions
Jump to navigation
Jump to search
m (format) |
Lou Montana (talk | contribs) (Page filling) |
||
Line 1: | Line 1: | ||
{{Command|= | {{Command|= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|arma3 |= | |||
|1.68| | |arma3 |Game= | ||
|1.68|Game Version= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Sets the path to follow for AI driver |= | |||
| Sets the path to follow for AI driver. Note that [[unitReady]] will return [[true]] even if AI is still driving through the points.<br /> | |||
Using any other ''move'' command (e.g {{Inline code|vehicleName [[move]] [[getPos]] vehicleName}}) will stop the effect of this command. |Description= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| vehicleName [[setDriveOnPath]] | |||
|p1= vehicleName: [[Object]] | | | vehicleName [[setDriveOnPath]] points |Syntax= | ||
|p2= points: [[Array]] - | |||
|p1= vehicleName: [[Object]] |Parameter 1= | |||
|p2= points: [[Array]] - list of [[Position|Positions]] to format [x,y,z] OR to format [x,y,z, speed], speed being '''in m/s'''. |Parameter 2= | |||
| [[Nothing]] | | | [[Nothing]] |Return Value= | ||
| | |||
| | |x1= <code>myVehicle [[setDriveOnPath]] <nowiki>[</nowiki>[[getMarkerPos]] "wp1", [[getMarkerPos]] "wp2"];</code> |Example 1= | ||
| | |||
| | |x2= <code>_points = [[allMapMarkers]] [[apply]] { [[getMarkerPos]] _x; }; {{codecomment|// getting all marker positions}} | ||
| | { [[_x]] [[pushBack]] 15; } forEach _points; {{codecomment|// setting [[speed]]}} | ||
myVehicle [[setDriveOnPath]] _points;</code> |Example 2= | |||
| | |||
| [[move]], [[forceSpeed]], [[limitSpeed]], [[Waypoint]] |See Also= | |||
}} | }} | ||
Line 40: | Line 42: | ||
<!-- Appropriate categories go here --> | <!-- Appropriate categories go here --> | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
Revision as of 11:42, 1 July 2018
Description
- Description:
- Sets the path to follow for AI driver. Note that unitReady will return true even if AI is still driving through the points.
Using any other move command (e.gvehicleName move getPos vehicleName
) will stop the effect of this command. - Groups:
- Uncategorised
Syntax
- Syntax:
- vehicleName setDriveOnPath points
- Parameters:
- vehicleName: Object
- points: Array - list of Positions to format [x,y,z] OR to format [x,y,z, speed], speed being in m/s.
- Return Value:
- Nothing
Examples
- Example 1:
myVehicle setDriveOnPath [getMarkerPos "wp1", getMarkerPos "wp2"];
- Example 2:
_points = allMapMarkers apply { getMarkerPos _x; }; // getting all marker positions { _x pushBack 15; } forEach _points; // setting speed myVehicle setDriveOnPath _points;
Additional Information
- See also:
- moveforceSpeedlimitSpeedWaypoint
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