setDriveOnPath: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)\]\]" to "{{GameCategory|arma3|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


|arma3 |Game=
|arma3 |Game=
Line 7: Line 6:


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation |GROUP1=
____________________________________________________________________________________________


| Sets the path to follow for AI driver. Note that [[unitReady]] will return [[true]] even if AI is still driving through the points.<br>
| 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}}) or [[doStop]] will stop the effect of this command. |Description=
Using any other ''move'' command (e.g {{Inline code|vehicleName [[move]] [[getPos]] vehicleName}}) or [[doStop]] will stop the effect of this command. |Description=
____________________________________________________________________________________________


| vehicleName [[setDriveOnPath]] points |Syntax=
| vehicleName [[setDriveOnPath]] points |Syntax=

Revision as of 02:38, 17 January 2021

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) or doStop will stop the effect of this command.
Groups:
Object Manipulation

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