RPG Maker MV Centering a picture on Actor Sprite while on a map?

Discussion in 'RPG Maker MV' started by Yawgmoth, Oct 13, 2019.

Thread Status:
Not open for further replies.
  1. Yawgmoth

    Yawgmoth Veteran Veteran

    Messages:
    104
    Likes Received:
    8
    Location:
    Nebraska
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi all, I have a .png image with 225x63 dimensions. I am calling it using a plugin that activates a common event before a random encounter. I want the 225x63 image to be centered on the actor before the combat starts. I've searched the web and forums and have not found any way to do this.

    Any help or ideas to accomplish this would be appreciated.

    This is the first time I have tried out pictures.
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,712
    Likes Received:
    11,420
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    So you want to show this on the map, before transitioning to the battle screen?

    Use Control Variables to get the player's Screen X and Screen Y positions into two different variables (this is under Game Data > Character's > Player's > Screen X/Y.

    Then in the Show Picture command, set the origin to the center of the picture rather than top left, and use the variables to set the position.
     
    #2
  3. Yawgmoth

    Yawgmoth Veteran Veteran

    Messages:
    104
    Likes Received:
    8
    Location:
    Nebraska
    First Language:
    English
    Primarily Uses:
    RMMV
    @Shaz Ok sounds simple, I'll give it a try and yes show the picture before the screen transitions into the battle screen. Thanks for the reply.

    EDIT: So I am assuming I have done something incorrect, I made a couple of quick test events. One is a parallel processing that sets the variables and then switches to another page. My other event is suppose to show a picture centered on the player when I step on the event. I can still see the picture in the top left. I posted screenshots of the two events below.
     

    Attached Files:

    Last edited: Oct 14, 2019 at 12:22 AM
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,712
    Likes Received:
    11,420
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Why is the second page set to Player Touch? That means you're getting the coordinates of the player, then letting them walk around a bit, then moving the picture to where the player used to be.

    You don't need two pages. Get the coordinates into the variable at the exact time you want to show the picture.
     
    #4
  5. Yawgmoth

    Yawgmoth Veteran Veteran

    Messages:
    104
    Likes Received:
    8
    Location:
    Nebraska
    First Language:
    English
    Primarily Uses:
    RMMV
    @Shaz I had two separate events just for testing, but I altered it to a single common event. Something is still wrong with the variables. I'm posting a screenshot of the common event I am using now below.
     

    Attached Files:

    #5
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,712
    Likes Received:
    11,420
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You are setting the variables to the player's MAP x and y. You should be setting them to the SCREEN x and y, as pictures are attached to the screen, not to the map. Screen X and Y are obtained via the same method.
     
    #6
  7. Yawgmoth

    Yawgmoth Veteran Veteran

    Messages:
    104
    Likes Received:
    8
    Location:
    Nebraska
    First Language:
    English
    Primarily Uses:
    RMMV
    @Shaz Thank you for your patience. I didn't realize there were further options. I have never played with these aspects of RPG Maker before, but you successfully talked me through it and it works! Thank you again!
     
    #7
  8. bgillisp

    bgillisp Global Moderators Global Mod

    Messages:
    12,093
    Likes Received:
    12,271
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA

    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