Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Changes the user-assigned waypoint to the specified location, encoded as a UiMapPoint structure.
C_Map.SetUserWaypoint(point)
Arguments[]
- point
- UiMapPoint
Key | Type | Description |
---|---|---|
uiMapID | number | uiMapID |
position | Vector2DMixin🔗 | |
z | number? |
Example[]
Sets a waypoint on the current player position.
local mapID = C_Map.GetBestMapForUnit("player")
if C_Map.CanSetUserWaypointOnMap(mapID) then
local pos = C_Map.GetPlayerMapPosition(mapID, "player")
local mapPoint = UiMapPoint.CreateFromVector2D(mapID, pos)
C_Map.SetUserWaypoint(mapPoint)
else
print("Cannot set waypoints on this map")
end
Patch changes[]
Patch 9.0.1 (2020-10-13): Added.