Hello,
In my game, I'm using an exported GB Studio game inside of an iframe, as shown here:
To achieve this, I just imported all gb studio generated files and imported them in the Files folder in the Project Manager (while redirecting everything to be outside of folders).
This works fine, but I want to be able to get C3's variables from inside the Script.JS file. I've looked around, but I still can't quite grasp how to achieve that.
I've tried creating a main.js file, and tried referencing it in the gb.html file, which loads the emulator, but since the Script.JS code is only called when the iframe is created, I get a "main.js:5 Uncaught ReferenceError: runOnStartup is not defined" error.
Any help is appreciated!