How to fix NPC on left->right move route briefly turning left on player touch event page?

Hi all, happy new year!!

I have an event that's exhibiting very annoying behavior I can't track down, I'll provide as much info as possible, and happy to provide anything additional. This is a bit of an involved setup but I'm grateful if anyone is able to engage -- I'm certain the problem stems from a fundamental misunderstanding of some element of RPGMV eventing (as always).

On one of my streets, I have a car that randomly goes right to left, and one that randomly goes left to right, in the appropriate lanes. It approximates road traffic. If you touch the front of the car, you die, and if you touch anywhere else on the car you get bounced either up or down and take damage.

The damage/die events are common events.

The cars are loaded onto the map with a single, centered event representing the large car sprite -- note that only the separated-out event has a sprite, the 9 other events are empty. The car sprite is the size of a 5x2 grid, so this solution works really nicely.

2024-01-01 01_27_04-NHNT - RPG Maker MV.png


If the car is triggered, all these car events are moved to the side of the screen, with the separate car sprite event slotted into the correct spot at the bottom, and they trundle across the screen in a block. It works as it should, and for the most part, the events where you hit the car work fine.

When the car event is triggered, a sprite is chosen for the car from a random pool. Here's a portion of the parallel event that moves all the sprites into place, and chooses a sprite:

2024-01-01 01_27_30-ID_065 - Event Editor.png


This works fine. The sprites are all moved into position at the edge of the road, a sprite is chosen from a pool of car sprites, and all of the car events begin moving as they should. All the events then have active pages with player touch events that trigger the common events that either kill the player or do damage. If you touch one of the lower row of sprites, you bounce away to the bottom:

2024-01-01 01_38_29-Database.png


If you touch one of the top row of car sprites, you bounce off towards the top:

2024-01-01 01_38_37-Database.png


For the car going right to left, the sprite works perfectly, with no problems.

However, for the car going left to right, if I touch the event containing the sprite, it briefly flashes with a left-facing sprite for one frame. Here's a video where I touch the sprite-event of the left-right car, and it flashes the wrong direction briefly, and then touch the sprite-event of the right-left car, and nothing happens:




I've done a lot of troubleshooting, but the problem is there's just not that many potential avenues for this bug to creep in. My only suspicion has to do with the default sprite, when assigning the image, is left-facing by default:

2024-01-01 01_27_46-Set Movement Route.png


And this is something I don't entirely understand -- the preview here is from a left-facing portion of the sprite, but the sprite sheet is a normal 4x3 sprite. Is the thumbnail here irrelevant? When choosing it, I don't have the option to choose one of the positions, I can only click on the entire sheet. Here's a sample sprite sheet:

$acura_integra_MASTER.png


All of the sprite sheets look like this (the cars will never actually go up or down), and the bug happens regardless of the sprite.

Anyway, I know this is a bit of an involved issue, but that's what makes it so frustrating, since the bug is so tiny and silly, and yet difficult to track down!

I simply can't for the life of me understand why the bug exists for the left-right moving sprite, and not for the right-left moving one. The parallel events that move the cars are mirror images of each other.

If anyone has any ideas, I'm grateful for the help -- thank you!!

c
Did you tick the "Direction Fix" button on the car's event page? Maybe it's trying to turn to "talk" to the player when they touch it.
Did you tick the "Direction Fix" button on the car's event page? Maybe it's trying to turn to "talk" to the player when they touch it.

Yes, it does seem like the car is trying to turn down to talk to the player -- that explains why it only happens on the L-> traveling car. But weirdly, checking the direction fix box makes the car face left the entire time, as it drives to the right! That part I can't figure out.

I also tried manually turning it right and then setting direction fix on in the move route, but that doesn't work.

So confusing. I suppose I could make entirely separate sprites for the cars going in each direction, but that just seems so wasteful.

This makes me wonder if the sprite is somehow initializing as left-facing? I'm still a bit confused about why I can choose an orientation on regular character sprites, whereas this car sprite, which is evenly divided 4x3, doesn't allow me to do that.

Appreciate your help, let me know if you have any other ideas!
It's default engine behavior. This might fix it

It's default engine behavior. This might fix it


That fixed it! I never would have known otherwise, thank you so much for your help!

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.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-fix-npc-on-left-right-move-route-briefly-turning-left-on-player-touch-event-page.164343/