setWaypointPosition: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]OFP[ _]Elite *(\|.*)?\]\]" to "{{GameCategory|ofpe|Scripting Commands}}") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Command|Comments= | {{Command|Comments= | ||
| arma1 |Game name= | | arma1 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Waypoints |GROUP1= | |gr1= Waypoints |GROUP1= | ||
| Attempts to move given waypoint to a random position inside a circle with the given center and radius. | | Attempts to move given waypoint to a random position inside a circle with the given center and radius. | ||
Line 13: | Line 11: | ||
The waypoint will be placed similar to <tt>"NONE"</tt> attribute in [[setVehiclePosition]], even if the radius is 0, which means it could still be off center. In order to force waypoint to the exact position, similar to <tt>"CAN_COLLIDE"</tt> attribute, use negative radius, like -1 for example. You will probably laugh at this, but be warned: | The waypoint will be placed similar to <tt>"NONE"</tt> attribute in [[setVehiclePosition]], even if the radius is 0, which means it could still be off center. In order to force waypoint to the exact position, similar to <tt>"CAN_COLLIDE"</tt> attribute, use negative radius, like -1 for example. You will probably laugh at this, but be warned: | ||
{{ Warning | When using negative radius, the center position supplied must be [[PositionASL]], only then the resulting [[waypointPosition]] will be in format [[PositionAGL]] and not buried under the ground ¯\_(ツ)_/¯}}|DESCRIPTION= | {{ Warning | When using negative radius, the center position supplied must be [[PositionASL]], only then the resulting [[waypointPosition]] will be in format [[PositionAGL]] and not buried under the ground ¯\_(ツ)_/¯}}|DESCRIPTION= | ||
| waypoint '''setWaypointPosition''' [center, radius] |SYNTAX= | | waypoint '''setWaypointPosition''' [center, radius] |SYNTAX= | ||
Line 23: | Line 20: | ||
| [[Nothing]] |RETURNVALUE= | | [[Nothing]] |RETURNVALUE= | ||
|x1= <code>[_grp, 2] [[setWaypointPosition]] [<nowiki/>[[position]] [[player]], 0];</code> |EXAMPLE1= | |x1= <code>[_grp, 2] [[setWaypointPosition]] [<nowiki/>[[position]] [[player]], 0];</code> |EXAMPLE1= | ||
|x2= Exact placement (see description): <code>_wp [[setWaypointPosition]] [<nowiki/>[[getPosASL]] [[player]], -1];</code> |EXAMPLE2= | |x2= Exact placement (see description): <code>_wp [[setWaypointPosition]] [<nowiki/>[[getPosASL]] [[player]], -1];</code> |EXAMPLE2= | ||
| [[waypointPosition]], [[setWPPos]], [[waypoints]], [[deleteWaypoint]], [[copyWaypoints]], [[setCurrentWaypoint]], [[setWaypointBehaviour]], [[setWaypointCombatMode]], [[setWaypointCompletionRadius]], [[setWaypointDescription]], [[setWaypointFormation]], [[setWaypointHousePosition]], [[setWaypointScript]], [[setWaypointSpeed]], [[setWaypointStatements]], [[setWaypointTimeout]], [[setWaypointType]], [[setWaypointVisible]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[setWaypointLoiterRadius]], [[waypointLoiterRadius]], [[addWaypoint]], [[setWaypointLoiterType]], [[waypointSpeed]] |SEEALSO= | | [[waypointPosition]], [[setWPPos]], [[waypoints]], [[deleteWaypoint]], [[copyWaypoints]], [[setCurrentWaypoint]], [[setWaypointBehaviour]], [[setWaypointCombatMode]], [[setWaypointCompletionRadius]], [[setWaypointDescription]], [[setWaypointFormation]], [[setWaypointHousePosition]], [[setWaypointScript]], [[setWaypointSpeed]], [[setWaypointStatements]], [[setWaypointTimeout]], [[setWaypointType]], [[setWaypointVisible]], [[waypointAttachVehicle]], [[waypointAttachedVehicle]], [[setWaypointLoiterRadius]], [[waypointLoiterRadius]], [[addWaypoint]], [[setWaypointLoiterType]], [[waypointSpeed]] |SEEALSO= |
Revision as of 03:42, 17 January 2021
Description
- Description:
- Attempts to move given waypoint to a random position inside a circle with the given center and radius.
The waypoint will be placed similar to "NONE" attribute in setVehiclePosition, even if the radius is 0, which means it could still be off center. In order to force waypoint to the exact position, similar to "CAN_COLLIDE" attribute, use negative radius, like -1 for example. You will probably laugh at this, but be warned:
- Groups:
- Waypoints
Syntax
- Syntax:
- waypoint setWaypointPosition [center, radius]
- Parameters:
- waypoint: Array - format Waypoint
- [center, radius]: Array
- center: PositionAGL or Object (or PositionASL if the radius is negative)
- radius: Number - random placement radius in meters. Set it to -1 and convert center to PositionASL for the exact center placement.
- Return Value:
- Nothing
Examples
- Example 1:
[_grp, 2] setWaypointPosition [position player, 0];
- Example 2:
- Exact placement (see description):
_wp setWaypointPosition [getPosASL player, -1];
Additional Information
- See also:
- waypointPositionsetWPPoswaypointsdeleteWaypointcopyWaypointssetCurrentWaypointsetWaypointBehavioursetWaypointCombatModesetWaypointCompletionRadiussetWaypointDescriptionsetWaypointFormationsetWaypointHousePositionsetWaypointScriptsetWaypointSpeedsetWaypointStatementssetWaypointTimeoutsetWaypointTypesetWaypointVisiblewaypointAttachVehiclewaypointAttachedVehiclesetWaypointLoiterRadiuswaypointLoiterRadiusaddWaypointsetWaypointLoiterTypewaypointSpeed
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
Notes
Bottom Section
- Posted on November 14, 2018 - 22:52 (UTC)
- killzone_kid
- If you want AI to understand height of the waypoint, for example set waypoint at the top of Military Cargo Tower, use Example 2, with position in ASL format and -1 radius.
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Command Group: Waypoints
- Operation Flashpoint: Elite: Scripting Commands
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands