Map Editor API _ WorkAdventure Documentation
Map Editor API _ WorkAdventure Documentation
WorkAdventure APIs Map Scripting API Api Reference Map Editor API
Detecting when the user enters/leaves an area
Inbound API edited by the map editor
Map Scripting API Map Editor API Getting the list of all areas created in the map
editor
Variables
Currently, the map editor API provides a way to read the areas defined in the map editor and to detect when the user enters or leaves
Events
an area. It is "read-only". You cannot modify the map using this API.
Api Reference
We opted for a different approach to the event's detection of 'enter' and 'leave' zones when dealing with an area edited by the map
Camera
editor.
Chat
Controls
Event
Detecting when the user enters/leaves an area edited by the map
Map Editor API
editor
Metadata
WA.mapEditor.onEnter(name: string): Subscription
Navigation WA.mapEditor.onLeave(name: string): Subscription
Player
Listens to the position of the current user. The event is triggered when the user enters or leaves a given area.
Players
Room name: the name of the area defined in the map editor.
Sound
Example:
Start
interface MapEditorArea {
name: string;
x: number;
y: number;
width: number;
height: number;
description: string|undefined;
searchable: boolean|undefined;
}
Example:
Previous Next
« Event Metadata »