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,243
Reaction score
11,853
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,243
Reaction score
11,853
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,243
Reaction score
11,853
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,497
Reaction score
12,778
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 Posts

Latest Profile Posts

I guess the concept of friendship has changed :") Today I saw a very quiet boy getting bullied by his 'friends' because he wasn't talking. They made a circle and made him sit in the middle and were nagging him saying hey talk, sing a song, do this tongue twister etc. etc. And I could totally see the discomfort in the boy's face. Glad I don't have 'friends' lmao
Music is my life, getting noticed for it is the best compliment I can get. So thanks to those who expressed interest :)
character for fun, based on various friends input.

I've noticed that the website has changed a lot since I left in August last year...
One of my kitties after a long, tiring day of being adorable.

Forum statistics

Threads
93,363
Messages
911,683
Members
122,856
Latest member
HelioUnicorn
Top