Hello, I want to make a 4th-wall-breaking-system in my game, such as the character moving out of the game application window and roaming around the desktop.
To make this happen, I had to make a transparent pop up window to be open, so that the players would think it actually 'went out of the application screen'. I've almost successfully made out to make a pop up window transparent and to set up character roam around, but there is two major problems:
1. when the pop up window is opened, the game window lose its control and stop processing. I can't press on the enter key nor make the event autoprocess work, it just stops COMPLETELY -\ for example, if there is another text after the scene, it's not leading to that text, and the screen stops. Is this normal? I want the game window to still process and make autoprocess even when the pop up is open. Is there any javascript code for that?
2. When opening the pop up window, I've used nw.window.open() instead of window.open() because I wasn't able to control the transparency when I use window.open(). However, now I can't find the right code to CLOSE this popup since it's not a major used code.
I specifically want the pop up window to be open, then a few lines of text goingon the major-game window, and then the pop up to be closed- so the code for opening and closing the pop up should be split. (There could be some points which I'm totally wrong because I am a newbie for both RPG making and coding.......)
this is my code(the html code is longer so I've attached the pic)
var _width = window.screenLeft
var _top = window.screenTop + window.outerHeight
var HHeight = window.screen.availHeight - _top
win = nw.Window.open('js/vscode/html/index.html', {frame:false, transparent: true, width:window.screen.width, height:HHeight}, function(win) {win.moveTo(_width, _top);});
I am not using any plugins rn
To make this happen, I had to make a transparent pop up window to be open, so that the players would think it actually 'went out of the application screen'. I've almost successfully made out to make a pop up window transparent and to set up character roam around, but there is two major problems:
1. when the pop up window is opened, the game window lose its control and stop processing. I can't press on the enter key nor make the event autoprocess work, it just stops COMPLETELY -\ for example, if there is another text after the scene, it's not leading to that text, and the screen stops. Is this normal? I want the game window to still process and make autoprocess even when the pop up is open. Is there any javascript code for that?
2. When opening the pop up window, I've used nw.window.open() instead of window.open() because I wasn't able to control the transparency when I use window.open(). However, now I can't find the right code to CLOSE this popup since it's not a major used code.
I specifically want the pop up window to be open, then a few lines of text goingon the major-game window, and then the pop up to be closed- so the code for opening and closing the pop up should be split. (There could be some points which I'm totally wrong because I am a newbie for both RPG making and coding.......)
this is my code(the html code is longer so I've attached the pic)
var _width = window.screenLeft
var _top = window.screenTop + window.outerHeight
var HHeight = window.screen.availHeight - _top
win = nw.Window.open('js/vscode/html/index.html', {frame:false, transparent: true, width:window.screen.width, height:HHeight}, function(win) {win.moveTo(_width, _top);});
I am not using any plugins rn