Status
Not open for further replies.

GmOcean

Veteran
Veteran
Joined
Nov 29, 2020
Messages
59
Reaction score
46
First Language
English
Primarily Uses
RMMZ
This is a bit hard to explain but I'll try my best. My project heavily uses Parallax mapping and this is normally fine except I'm trying out a technique to give my maps some depth.
For buildings, houses, big trees, etc... I've take those specific images and turned them into graphics used by an event. Much like a big monster, it instead loads the image of that specific image.
For instance one of my buildings is a tile size of 5x10. (5 tiles left/right 10 tiles up/down).
What I did was put that image into an image roughly 3x4 it's size to create a big sprite sheet. On that sheet, 1 of the sprites would be the building as it is. On another it would be the building with a different opacity, or something changed, etc... Some would even just be left blank with nothing there.

Now using Visustella's Events and Movement Core plugin, I have 1 Parallel Event, checking for regions stepped on. If the player steps on the appropriate region, this single event changes a switch to on.
Then the building events will have a page that uses that switch. In this case the event will switch from sprite 1 to sprite 2 on the aforementioned sprite sheet. Making it's opacity change. But also having it appear above the player, to give the illusion I'm walking behind the building but able to see what's there. Unlike in normal RPG maker, the houses, buildings and such would be opaque and completely hide the player from view.

Now this is where the issue starts. Depending on where the player enters the map from (Top of the map or bottom of the map), the events act weird.

More specifically I design my maps from the top down to the bottom. So if I place my player at the top and play test, whenever I try to walk behind buildings etc, they change opaque, but the player stays above them. Which shouldn't be the case since the event is supposed to be "above player".
But if I place my player at the bottom of the map and play test, everything works as normal.

So my question is, why? Is the game engine having difficulties loading all the information in the proper order, or is it all relative to the player's starting point and loads from there? I would assume that the engine loads events in the order their listed in the map data not in render distance of the player.

Note - When I say bottom of map, it's actually the middle, but even if placed lower at the actual bottom, it's still the same. (Current bottom is empty with nothing there).
Player at the top of map
Player at the bottom of map
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,370
Reaction score
8,093
First Language
German
Primarily Uses
RMMV
please show us the events, not your map, as screenshots.

I can think of three or four different ways of how to do what you describe, and I assume you're using a wrong way because if done the way I think it should be done there would be no such issues.
 

GmOcean

Veteran
Veteran
Joined
Nov 29, 2020
Messages
59
Reaction score
46
First Language
English
Primarily Uses
RMMZ
Okay.
So with this plugin, player touch is set so if the player steps on the regions specified in the comment tag, they'll activate as if the player touched the event. Same with parallel events, it'll only activate on the regions specified.
Region_Sensor.pngManor_1.pngManor_2.png

The first image is the only parallel event running on the map. The second and third image is the event that controls what happens in the images below:
Incorrect Display: (Happens when player is at the top of the map when playtesting).
https://ibb.co/PDrnqG7
and
Correct Display: (Happens when player is at the bottom of the map when playtesting).
https://ibb.co/DrPTMv3

As you can see, it's supposed to be "above" the character, so there isn't a reason for it to be below the character.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,370
Reaction score
8,093
First Language
German
Primarily Uses
RMMV
the player steps on the regions
that is your first problem: entering a map is not the same as stepping on a tile. It probably works from the bottom because the player is transported onto a tile without a region ID and you regularly step on the tiles with region ID, but on the top you place the player on a region ID directly, so the event will not trigger.

that said, why do you make things that needlessly complex?
just have a single common event (either on parallel or triggered by plugin) check the region ID and then change the switch directly for the events involved, no need to have any code at all in those decorative events. you don't even need a plugin that way (although that plugin may have other advantages)
 

GmOcean

Veteran
Veteran
Joined
Nov 29, 2020
Messages
59
Reaction score
46
First Language
English
Primarily Uses
RMMZ
The common event in this case would do the same as the other event that checks for regions, I could just remove the comment tag and it'll do exactly that. This just saves on processing power if I add more Parallel events in the future that are heavier. But I shall definitely give it a consideration.

As for the bottom vs top, the player is ported on to a tile without a Region ID for both of them. That's the problem. They both start out on Region ID 0 ( or no region id). And this problem happens based on where they are initially. Which is why it's mind boggling.


Edit: I tried the common event, and nothing changed that didn't work. To be more specific I tested a common event to turn 1 switch on, when I step on region ID 1. And turn the switch off when I step on region ID 2. The "decorative" events display as normal when the switch is OFF. But display in properly (below character instead of above) when the switch is ON.

Edit 2: After creating a copy of my 1 parallel event (Making it Event #47). Deleting the original (Event #1). Everything worked as intended regardless of where the player loads the map.
Though, this begs the question of why? Nothing changed except the order it's stored in the map data. Especially since all it does is listen for player stepping on regions and then flipping switches on/off.

While I don't under stand why this worked, it did. But thank you anyways, @Andar .
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,313
Reaction score
5,481
First Language
Dutch
Primarily Uses
RMXP

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.

Latest Threads

Latest Profile Posts

xabileug wrote on thenerdmansion's profile.
TMCard - tomoaky
Hi i am currently working on a personal game using tomoaky TMCard in MV. i already have several modifications to it..

Screenshot-2021-04-18-at-19-32-48.png


Rest your weary legs in the Dancing Fox Inn!
Love to kick back and gamemak at the end of the day.
yay, i finally got around adding a profile pic! :guffaw:
My imagination works faster than my development process. At least, I can take pleasure in treating it as an adventure. :)

Forum statistics

Threads
110,596
Messages
1,054,580
Members
143,730
Latest member
PessNaro
Top