I have the next piece of code (the url is an example), and it opens to another website outside the game thanks to Chromium.
Switch #34 is created in order to Start a Timer coutdown of 90 seconds, created like the ones of https://kokororeflections.com/countdown-timer-in-rpg-maker-ace-mv/
I believe, as script is sandboxed, when the script ends without knowing if switch window.win is closed, timer doesn't stop.
Is there any way to make window.win a global switch in order to stop the timer when it is closed?
It certainly sounds like a tongue twister.
It would help me the same if window.open could be save as a gameSwitch/gameVariable. Is it possible?
JavaScript:
window.win = window.open('https://www.rpgmakerweb.com/');
$gameSwitches.setValue(34,true)
if(win.closed) {
$gameSwitches.setValue(34,false)}
Switch #34 is created in order to Start a Timer coutdown of 90 seconds, created like the ones of https://kokororeflections.com/countdown-timer-in-rpg-maker-ace-mv/
I believe, as script is sandboxed, when the script ends without knowing if switch window.win is closed, timer doesn't stop.
Is there any way to make window.win a global switch in order to stop the timer when it is closed?
It certainly sounds like a tongue twister.
It would help me the same if window.open could be save as a gameSwitch/gameVariable. Is it possible?