setWaypointPosition: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) mNo edit summary |
Killzone Kid (talk | contribs) (takes object too) |
||
Line 15: | Line 15: | ||
|p1= waypoint: [[Array]] - format [[Waypoint]] |= Parameter 1 | |p1= waypoint: [[Array]] - format [[Waypoint]] |= Parameter 1 | ||
|p2= [center, radius]: [[Array]] |= Parameter 2 | |p2= [center, radius]: [[Array]] |= Parameter 2 | ||
|p3= center: [[Array]] | |p3= center: [[Array]] in format [[Position]] or [[Object]] (or [[PositionASL]] if the radius is negative) |= Parameter 3 | ||
|p4= radius: [[Number]] - random placement radius in meters. Set it to -1 and convert center to [[PositionASL]] for the exact center placement. |= Parameter 4 | |p4= radius: [[Number]] - random placement radius in meters. Set it to -1 and convert center to [[PositionASL]] for the exact center placement. |= Parameter 4 | ||
Revision as of 22:25, 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 laugh at this, but be warned:
- Groups:
- Uncategorised
Syntax
- Syntax:
- waypoint setWaypointPosition [center, radius]
- Parameters:
- waypoint: Array - format Waypoint
- [center, radius]: Array
- center: Array in format Position 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):
[_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