setWaypointPosition: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (exact placement requires positionASL, wouldn't be Arma, would it?) |
Killzone Kid (talk | contribs) mNo edit summary |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| 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 will laugh at this, but be warned: | | 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 will laugh at this, but be warned: <br><br> | ||
{{ Warning | When using negative radius, the center position supplied must be [[PositionASL]] }}|= Description | {{ Warning | When using negative radius, the center position supplied must be [[PositionASL]] }}|= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 22: | Line 22: | ||
|x1= <code>[_grp, 2] [[setWaypointPosition]] <nowiki>[</nowiki>[[position]] [[player]], 0];</code> |= Example 1 | |x1= <code>[_grp, 2] [[setWaypointPosition]] <nowiki>[</nowiki>[[position]] [[player]], 0];</code> |= Example 1 | ||
|x2= Exact placement (see description): <code>[_grp, 2] [[setWaypointPosition]] <nowiki>[</nowiki>[[ | |x2= Exact placement (see description): <code>[_grp, 2] [[setWaypointPosition]] <nowiki>[</nowiki>[[getPosASL]] [[player]], -1];</code> |= Example 2 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Revision as of 22:14, 14 November 2018
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 will laugh at this, but be warned:
- Groups:
- Uncategorised
Syntax
- Syntax:
- waypoint setWaypointPosition [center, radius]
- Parameters:
- waypoint: Array - format Waypoint
- [center, radius]: Array
- center: Array - format Position (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):
[_grp, 2] setWaypointPosition [getPosASL player, -1];
Additional Information
- See also:
- waypointsdeleteWaypointcopyWaypointssetCurrentWaypointsetWaypointBehavioursetWaypointCombatModesetWaypointCompletionRadiussetWaypointDescriptionsetWaypointFormationsetWaypointHousePositionsetWaypointScriptsetWaypointSpeedsetWaypointStatementssetWaypointTimeoutsetWaypointTypesetWaypointVisiblewaypointAttachVehiclewaypointAttachedVehiclesetWaypointLoiterRadiuswaypointLoiterRadiusaddWaypointsetWaypointLoiterTypewaypointSpeed
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