I've created a plugin with this simple function:
In an event, I put inside the Script dialog: logTest();
Run the game and... "logTest is not defined".
Edit: If I put the global function outside the IIFE it works.
Code:
(function() {
var logTest = function() {
console.log("test!");
}
})();
In an event, I put inside the Script dialog: logTest();
Run the game and... "logTest is not defined".
Edit: If I put the global function outside the IIFE it works.