partey_workadventure/maps/tests/ChangeLayerApi/script.js
2021-10-29 19:45:03 +02:00

7 lines
206 B
JavaScript

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