setDriveOnPath: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
(Correct description about when command doesn't work) |
||
(One intermediate revision by one other user not shown) | |||
Line 8: | Line 8: | ||
|descr= Sets the path to follow for AI driver. Note that [[unitReady]] will return [[true]] even if AI is still driving through the points.<br> | |descr= 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 <sqf inline>_vehicle move getPosATL _vehicle</sqf>) or [[doStop]] will stop the effect of this command. | Using any other ''move'' command (e.g <sqf inline>_vehicle move getPosATL _vehicle</sqf>) or [[doStop]] will stop the effect of this command. | ||
{{Feature|important|This command does '''not''' work on air vehicles and boats. Only land vehicles | {{Feature|important|This command does '''not''' work if the vehicle doesn't have an [[useAISteeringComponent|AI steering component]] defined in its config, or if the component is disabled. Thus, it never works on air vehicles and boats which don't use steering components. Only land vehicles may be compatible. (cars, tanks, APCs, etc.)}} | ||
{{Feature|informative|For the command to work properly, the unit must either be an [[createAgent|agent]], or in the case of normal AI, have been stopped using [[doStop]].}} | {{Feature|informative|For the command to work properly, the unit must either be an [[createAgent|agent]], or in the case of normal AI, have been stopped using [[doStop]].}} | ||
Line 27: | Line 27: | ||
</sqf> | </sqf> | ||
|seealso= [[move]] [[forceSpeed]] [[limitSpeed]] [[Waypoint]] | |seealso= [[move]] [[forceSpeed]] [[limitSpeed]] [[Waypoint]] [[useAISteeringComponent]] | ||
}} | }} | ||
Latest revision as of 17:57, 10 October 2023
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 _vehicle move getPosATL _vehicle) 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:
- Example 2:
- private _points = allMapMarkers apply { getMarkerPos _x; }; // getting all marker positions { _x pushBack 15; } forEach _points; // setting speed myVehicle setDriveOnPath _points;
Additional Information
- See also:
- move forceSpeed limitSpeed Waypoint useAISteeringComponent
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
- Posted on Jun 25, 2021 - 07:42 (UTC)
- To use this command, the AI must not have a formLeader. The easiest way to achieve this is to use doStop to stop the AI (warning! it'll break the AI waypoints)