Tile - YMap - Add Object Map Marker – Ylands

From Bohemia Interactive Community
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.