Adding the ability to register a single script using the "script" attribute at the map property level.

This commit is contained in:
David Négrier 2021-03-07 21:02:38 +01:00
parent 7d67f55012
commit 6fbf165c91
7 changed files with 202 additions and 3 deletions

8
maps/tests/script.js Normal file
View file

@ -0,0 +1,8 @@
console.log('SCRIPT LAUNCHED');
WA.sendChatMessage('Hi, my name is Poly and I repeat what you say!', 'Poly Parrot');
WA.onChatMessage((message => {
console.log('CHAT MESSAGE RECEIVED BY SCRIPT');
WA.sendChatMessage('Poly Parrot says: "'+message+'"', 'Poly Parrot');
}));