Vlue's pop-up script location issue

Discussion in 'RGSSx Script Support' started by Kes, Apr 10, 2018.

  1. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,794
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    Vlue's pop-up window script (found here) appears to allow for the location of the pop-up to be specified in the script call as indicated in the header instructions line 7. This is good, because I would like the pop-up to be near the tile where the item is found. In testing, that does not appear to be the case.

    The default position is central, both vertical and horizontal.
    However, no matter what x,y I put in the script call, all it does is appear extreme left horizontally and central vertically.
    It may be that I have misinterpreted the way to do the script call. Here is what I have put
    pop_up(['Some random loot found!'], 11, 2)

    Have I got an incorrect script call, or is there an issue with the script itself?
    Thanks.
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,712
    Likes Received:
    11,419
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    The coordinates are screen coordinates, not tile coordinates, so 11, 2 would normally be in the top left corner. However, you've left out the timer argument, so the 11 is going into the timer, the 2 going into the x coordinate (which is why it's on the far left), and 0 is going into the y coordinate (which is why it's centered vertically, as that's the default if the y value isn't entered).
     
    Last edited: Apr 10, 2018
    #2
    Kes likes this.
  3. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,794
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Shaz I had wondered about that. Putting in 300, 100 moved the window about one third of the way from the left edge, but putting in 400, 100 or 500, 100 didn't push it any further right. It was still central vertically. Changing the y coordinate to 500, 2 put it back over on the left edge again.

    I am confused.
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,712
    Likes Received:
    11,419
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You need to add the timer argument.

    pop_up(['Some random loot found!'], 180, 400, 100)
     
    #4
    Kes likes this.
  5. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,794
    Likes Received:
    10,584
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Shaz Yes, that does it!
    Thank you so much.
     
    #5
    Shaz likes this.

Share This Page