What the title says. I need to receive the values of the coordinates of the message window into two variables. Before anyone asks why in the world will I need this, let me explain. I'm using Galv's message style plugin. I want to use an animated bust plugin which uses the show picture command. This message style causes the message window to appear at random places depending on who is speaking. So I need to find a way to check where the window is to show the image near it.
Any way to check message window position? [solved]
RPG Maker MV Supportin the text box, there is a option to place it on the bottom (default), middle or top
I don't know about Glav's plugin, but the default window's position can be checked with this:
I forgot what number is bottom, mid and top, but I'm sure it's easy for you to test and see.
Code:
$gameMessage.positionType()
I forgot what number is bottom, mid and top, but I'm sure it's easy for you to test and see.
Actually I wanted to check it in pixels. Galv's plugin makes it so that the textbox appears above the ecent that's speaking and that event can be anywhere. Instead of going through all the trouble of seeing where the inage should be I thought I'd just check the Windows position...
a few things that should set you in the right path:
-X & Y are properties of every Window.
-the message window is a Window object (duh!)
-the message window belongs to the map scene.
-every Window has it's X and Y instanced.... meaning you can just ask for them directly, through the object, IF you first grab the object.
BUT
-since the message window belongs to the map scene, you have to grab the whole stack:
(object) = (scene).(window)
(obj_property_val) = (object).(property)
so....
maybe? kinda? (assuming that _scene is a Scene_Map)
I'm not that savvy in JS, but that's the logic. >>>(FOR THE DEFAULT WINDOW)<<<
Galv's plugin might have it's own object, but still, it also belongs to the map scene, so it has to be named, and it has to be a window, so it has to have it's respective coordinates, which should be written in function of the event in question.
read the code, track the names, and you'll find it.
-X & Y are properties of every Window.
-the message window is a Window object (duh!)
-the message window belongs to the map scene.
-every Window has it's X and Y instanced.... meaning you can just ask for them directly, through the object, IF you first grab the object.
BUT
-since the message window belongs to the map scene, you have to grab the whole stack:
(object) = (scene).(window)
(obj_property_val) = (object).(property)
so....
Code:
SceneManager._scene._messagewindow.(prop)
maybe? kinda? (assuming that _scene is a Scene_Map)
I'm not that savvy in JS, but that's the logic. >>>(FOR THE DEFAULT WINDOW)<<<
Galv's plugin might have it's own object, but still, it also belongs to the map scene, so it has to be named, and it has to be a window, so it has to have it's respective coordinates, which should be written in function of the event in question.
read the code, track the names, and you'll find it.
Oh my my, this is too complicated for me ^^;
Maybe I should check it in another way. Maybe check the coordinates of the event who's talking and then show the image in x - (window width /2) {keeping the width constant}... I'll test it tomorrow.
Maybe I should check it in another way. Maybe check the coordinates of the event who's talking and then show the image in x - (window width /2) {keeping the width constant}... I'll test it tomorrow.
SceneManager._scene._messageWindow.x
SceneManager._scene._messageWindow.y
...I didn't even see this lol. I just saw the above gibberish ( yes that's gibberish to me XD cos I don't understand those things) and didnt scroll down. Later on I saw these script calls somewhere and just now I saw this.
It works now so this thread can be closed~
SceneManager._scene._messageWindow.y
...I didn't even see this lol. I just saw the above gibberish ( yes that's gibberish to me XD cos I don't understand those things) and didnt scroll down. Later on I saw these script calls somewhere and just now I saw this.
It works now so this thread can be closed~
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/any-way-to-check-message-window-position-solved.110003/