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

Status
Not open for further replies.

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
114
Reaction score
10
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,255
Reaction score
11,860
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.
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
114
Reaction score
10
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.
 

Attachments

Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,255
Reaction score
11,860
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.
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
114
Reaction score
10
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.
 

Attachments

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,255
Reaction score
11,860
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.
 

Yawgmoth

Veteran
Veteran
Joined
Jan 9, 2018
Messages
114
Reaction score
10
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!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,500
Reaction score
12,784
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.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Stuffing three people in a room and thinking they'll study together is so wrong XD I don't get how people do group studies. We just end up gossiping about everything except studying lol
Been parallax mapping nigh all night. :D
2nd character based on the same random inputs
the coffee shop i go to for open mic every friday only has 2 more open mics left and then they're done :'( i'm gonna die!
Everytime someone says Intel "kabylake" I hear either baby lake or ladycake.

Forum statistics

Threads
93,386
Messages
911,882
Members
122,887
Latest member
Commander
Top