partey_workadventure/maps/tests/ChangeLayerApi/script.js

7 lines
206 B
JavaScript
Raw Normal View History

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