Need help with wide character sprite

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
Hi All,

So, I have a custom menu created using events that is a map all on its own. I'm trying to create a character to act as a cursor box for my menu.

A snippet of what I'm trying to accomplish is this:



Each node on the menu fits evenly into a space that equals 1 tile high and 2 tiles wide. The lighter grey boarder is my character sprite.

The character sprite sheet I created to act as the cursor box is this which I've named "!$CursorD.png" and each frame of the character is 46hx94w but should still fit within a 48x96:



But what ends up happening when I actually use it in my game is this:



instead of:



Also, the nodes themselves are set up as actual tiles from a tileset, so the menu itself is exactly to the grid.

Any help in fixing this would be greatly appreciated!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,939
Reaction score
13,577
First Language
English
Primarily Uses
RMMV
Your "player" can only be on one tile, not in the middle of two. So you are either on the left tile, or the right.

When you have a sprite that is larger than the tile size, it is centered horizontally. So whatever tile your player is on will have the middle of the box, and the ends of the boxes will extend over the two tiles on the sides.

What you need to do is add whitespace to the left or the right of each sprite, so it actually takes up the width of 3 tiles, and the box will be on the left two-thirds (if the player will be standing on the right of the two tiles), or the right two-thirds (if the player will be standing on the left of the two tiles). That way, the visible box will completely cover two tiles, and the whitespace will be on the tile on the other side.

If that's too convoluted, based on your screenshot, you need to add another tile width of whitespace to each column, on the right side of the box.

Do you have a way to make the player move horizontally two tiles, so the outline goes right across to the next menu item, rather than overlapping them both? That's going to be an issue to be addressed.
 

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
Thank you Shaz! Your solution worked for me. Much appreciated!

Do you have a way to make the player move horizontally two tiles, so the outline goes right across to the next menu item, rather than overlapping them both? That's going to be an issue to be addressed.
No, but I was hoping I could do that with a simple event, unless there is a better and/or easier way to do so?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,939
Reaction score
13,577
First Language
English
Primarily Uses
RMMV
You could have an event set to same as characters and player touch that will transfer the player to the correct spot for the next menu option (based on their facing direction) without a fade.
 

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
You could have an event set to same as characters and player touch that will transfer the player to the correct spot for the next menu option (based on their facing direction) without a fade.
So, I've done this but, sometimes it works and other times, it skips onto the one after the next one without stopping on the one it's supposed to and other times the cursor will visually move to the next and then the next after that. All of this with just one press of the button.

This is my event.



Thank's in advance.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,939
Reaction score
13,577
First Language
English
Primarily Uses
RMMV
It could be that you're holding the button down and 5 frames (1/20th of a second) is just not enough of a wait time. So it's triggering the first event, then you're transferring, then it's triggering the next event because the button is still down.

Maybe try making your wait longer - 30 frames is half a second.

I'm not really sure if this is the best way to go about it. I suspect there are tutorials on evented menu systems, but I'm not sure if they assume the events are all side by side, taking up a single tile, or if any of them cater for this situation. This is just an idea I came up with and maybe there's a better way.
 

Eilwyn

Veteran
Veteran
Joined
Mar 13, 2012
Messages
185
Reaction score
35
First Language
English
Primarily Uses
RMMV
That appears to have done the trick! Thanks again Shaz :).
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I will be streaming RPG Maker demos very soon
Not. Enough. TIME.
Ami
--- Cheating ---

Hero: I can't Stand this! (Activate Infinite HP, Stats 999)
Game Police: Hold right there!
Hero: What happened,sir?
Game Police: You're under arrest because Using Cheat in the Game,illegally!
(Handcuffing the Hero)
Hero: Huh???
Game Police: You have the Punishment to Not be in this world: 6 Months
Hero
: (Shocking) WHAT???
Need advice that should be adjusted
Some local cursed and attacked me because I said children should learn copyright....

Forum statistics

Threads
103,131
Messages
997,498
Members
134,607
Latest member
Hade
Top