Any way to check message window position? [solved]

Discussion in 'RPG Maker MV' started by Hyouryuu-Na, Jun 15, 2019.

Thread Status:
Not open for further replies.
  1. Hyouryuu-Na

    Hyouryuu-Na . . . Veteran

    Messages:
    240
    Likes Received:
    111
    Location:
    Bangladesh
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    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.
     
    #1
  2. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    400
    Likes Received:
    114
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    in the text box, there is a option to place it on the bottom (default), middle or top
     
    #2
  3. MushroomCake28

    MushroomCake28 KAMO Studio Veteran

    Messages:
    1,545
    Likes Received:
    2,780
    Location:
    Montreal, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    I don't know about Glav's plugin, but the default window's position can be checked with this:

    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.
     
    #3
  4. Hyouryuu-Na

    Hyouryuu-Na . . . Veteran

    Messages:
    240
    Likes Received:
    111
    Location:
    Bangladesh
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    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...
     
    #4
  5. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,674
    Likes Received:
    693
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    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....

    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.
     
    #5
    Hyouryuu-Na likes this.
  6. Hyouryuu-Na

    Hyouryuu-Na . . . Veteran

    Messages:
    240
    Likes Received:
    111
    Location:
    Bangladesh
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    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.
     
    #6
  7. Hyouryuu-Na

    Hyouryuu-Na . . . Veteran

    Messages:
    240
    Likes Received:
    111
    Location:
    Bangladesh
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    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~
     
    Last edited: Jun 16, 2019
    #7
  8. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,217
    Likes Received:
    3,938
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    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.

     
    #8
Thread Status:
Not open for further replies.

Share This Page