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,344
Reaction score
11,939
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,344
Reaction score
11,939
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,344
Reaction score
11,939
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,517
Reaction score
12,822
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 bought a 2 week emergency food supply. And people are already making fun of me :( I'll be fed for a bit while they go hungry when food supplies get cut(for whatever reason).
Start of semester today. This is going to be a long one.
Can't wait for the next Sonichu
Birdhouses are usually made of wood. Birds typically live in trees. Trees are wood. Birdhouses are made of birdhouses.
He just discovered cellphones...

(I don't know why am I drawing so much these days...)

Forum statistics

Threads
93,671
Messages
914,453
Members
123,261
Latest member
IBIZA
Top