GUI Control - Map
23 scripting commands. Also as Markdown for agents.
- ctrlMapAnimAddAdds the next frame to the map animation.
- ctrlMapAnimClearClears the map animation.
- ctrlMapAnimCommitPlays the map animation.
- ctrlMapAnimDoneChecks whether the map animation has finished.
- ctrlMapCursorChanges the default cursor that appears when interacting with a map control to a custom one. Use an empty string to restore the default cursor.
- ctrlMapDirReturns the current orientation angle of the map control in degrees.
- ctrlMapMouseOverReturns description of map sign mouse cursor is over. Works with in-game map as well as 2D editor map in edit mode.
- ctrlMapPositionA getter for ctrlMapSetPosition. Returns map position in format [x, y, w, h]. If map is inside a Controls Group, the x and y position is relative to…
- ctrlMapScaleReturns the current scale of given map control.
- ctrlMapScreenToWorldConverts map screen coordinates into world coordinates. Unlike posScreenToWorld, this command returns world position is format [x, y], otherwise it…
- ctrlMapSetPositionSets position and size of the given map control and recalculates control center. The effect is immediate and no ctrlCommit is necessary, unlike with…
- ctrlMapWorldToScreenConverts world coordinates into map screen coordinates. This command is identical to posWorldToScreen.
- drawArrowDraws a single line arrow on the map. As this command needs to be called every frame, it is preferable using the onDraw UI Event Handler. To draw a…
- drawEllipseDraws an ellipse on the map. Just like with marker or trigger area, negative *a* and *b* will result in hexagon.
- drawIconDraws an icon on the map. As this command needs to be called every frame, it is preferable using the onDraw UI Event Handler.
- drawLineDraw a line on the map. Can decrease framerate!
- drawLocationUsed to draw locations in 2D Editor.
- drawPolygonDraws given polygon on the given map control with given color. The polygon must consist of at least 3 points.
- drawRectangleDraws a rectangle on the map.
- drawTriangleDraws one to multiple triangles on the map.
- drawXPolygonDraws an N sided polygon on the map.
- mapCenterOnCameraThe main syntax enables/disables continuous centering of the main map type control on the camera position. Needs to be executed once.
- posWorldToScreenConverts world coordinates into map screen coordinates. This command is identical to ctrlMapWorldToScreen.