Tile - YMap - Add Object Map Marker – Ylands
Jump to navigation
Jump to search
Add Object Map Marker(Target object, Id, Image, Background color, Visible by default)
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
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.