Ylands:Tile - YMap - Add Object Map Marker

From Bohemia Interactive Community
Revision as of 14:27, 24 November 2023 by Lou Montana (talk | contribs) (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Add Object Map Marker(Target object, Id, Image, Background color, Visible by default)

YlandsTile-1155.png

YlandsTile-1155-rv.png

static addObjectMarker(targetObject: YEntity | YLogic | YGroup, id: string, image: YCustomImage | YImage, backgroundColor: YColor, visibleByDefault: boolean): YMapMarker;

Parameters

targetObject

Parent object of the map marker.

id

ID of the map marker. Must be unique in the scope of it's parent object.

image

Foreground image of the map marker.

backgroundColor

Color of the background image of the map marker.

visibleByDefault

Sets whether the map marker is automatically displayed to every player.

Returns

YMapMarker

Availability

Server

Description

Creates a new map marker object as a child to the target object.

Notes

  • Object map marker will follow it's parent on the map.