setDriveOnPath: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (format)
(Page filling)
Line 1: Line 1:
{{Command|=
{{Command|=
____________________________________________________________________________________________
____________________________________________________________________________________________
|arma3 |= Game
 
|1.68|= Game Version
|arma3 |Game=
|arg=  |= Multiplayer Arguments
 
|eff=  |= Multiplayer Effects
|1.68|Game Version=
____________________________________________________________________________________________
____________________________________________________________________________________________
| Sets the path to follow for AI driver |= Description
 
| 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]] [points] |= Syntax
 
|p1= vehicleName: [[Object]] |= Parameter 1
| vehicleName [[setDriveOnPath]] points |Syntax=
|p2= points: [[Array]] - List of points [x,y,z] |= Parameter 2
 
|p3= |= Parameter 3
|p1= vehicleName: [[Object]] |Parameter 1=
|p4=  |= Parameter 4
 
|p5=  |= Parameter 5
|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=
|p6=  |= Parameter 6
 
| [[Nothing]] |= Return Value
| [[Nothing]] |Return Value=
|s2= |= Alternative Syntax
 
|p21= |= Alternative Parameter 1
|x1= <code>myVehicle [[setDriveOnPath]] <nowiki>[</nowiki>[[getMarkerPos]] "wp1", [[getMarkerPos]] "wp2"];</code> |Example 1=
|p22=  |= Alternative Parameter 2
 
|p23=  |= Alternative Parameter 3
|x2= <code>_points = [[allMapMarkers]] [[apply]] { [[getMarkerPos]] _x; }; {{codecomment|// getting all marker positions}}
|p24=  |= Alternative Parameter 3
{ [[_x]] [[pushBack]] 15; } forEach _points; {{codecomment|// setting [[speed]]}}
|r2=  |= Alternative Return Value
myVehicle [[setDriveOnPath]] _points;</code> |Example 2=
|x1= myVehicle [[setDriveOnPath]] [[1000,10,1000],[1100,10,1000]] |= Example 1
 
| - |= See Also
| [[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}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 12:42, 1 July 2018

Hover & click on the images for description

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.g vehicleName 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

Bottom Section