partey_workadventure/maps/tests/ChangeLayerApi/script.js
2022-01-25 19:43:27 +00:00

7 lines
204 B
JavaScript

WA.room.onEnterLayer('myLayer').subscribe(() => {
WA.chat.sendChatMessage("Hello!", 'Woka');
});
WA.room.onLeaveLayer('myLayer').subscribe(() => {
WA.chat.sendChatMessage("Goodbye!", 'Woka');
});