Sprite change according to direction event/player interaction

System: MV

I did try conditional branching, testing it to be sure it would even work first; and nothing. I put the switches to autorun so that it would force the game to stop too. I don't have else on the event because if it wasn't working for one facing direction it wasn't going to work for the others. That's why I wondered if maybe a script would be better in this case.

I'm not sure what I'm missing for the event graphic to change depending on the set forth conditions to work right. If its a silly question then i apologize for wasting your time, but I am just stuck. TIA
1643980920916.png1643980559774.png1643980525925.png
Please describe what you want to achieve instead of ranting about what doesn't work.

because if i just read what your title says (and the post doesn't contain additional info about that part), then what you want is a basic function of the engine and works without any need for any command: the events automatically turn into the direction of the player if triggered by button.

I've moved this thread to MV Support. Thank you.

If the sprite is not moving and you just want them to face the player, you could set a custom movement with route turn toward player.

But I'm not really sure what you are asking.
Please describe what you want to achieve instead of ranting about what doesn't work.

because if i just read what your title says (and the post doesn't contain additional info about that part), then what you want is a basic function of the engine and works without any need for any command: the events automatically turn into the direction of the player if triggered by button.
The event uses a sprite that is pushing something. It makes no sense for the sprite to be facing one direction, then suddenly whirl to face the player, then whirl back the way it was facing, so I made a separate sheet that has a head turned. But I want it to be dependent on which way the sprite is facing and the player is facing when they talk to the sprite in which way the head will be turned.
In that case you'll need four different sprites, one sprite for each "pushing" direction.
in each sprite the four regular directions all keep the same pushing direction and have only the head turn in the direction of the player/from where the player interacts with the event.
you might have to modify the row where the player interacts from behind as no one can keep pushing in one direction while looking behind.

then change the sprite whenever the event changes pushing direction and let the engine handle the rest, no event commands needed for the interaction, only a change event sprite on changing push direction.
The event uses a sprite that is pushing something. It makes no sense for the sprite to be facing one direction, then suddenly whirl to face the player, then whirl back the way it was facing
As I pointed out in the JavaScript questions thread where you posted this first, you can't really change that inside the event - by the time any event commands are executed, the event has already turned because that's what the engine does when you activate an event.

You could probably figure out how the engine stores the event's original facing and reference that, but I bet you'd still see a flicker as the event faces the player and then your code turns it back.

In order for it to actually be seamless in the way you want, you'll need a plugin that modifies what happens when you activate an event, as I mentioned to you before.

Just as a tip, it is generally a bad idea to do what is called cross-posting in forums, wherein you post the same question in multiple places. It makes it more confusing for you to get different answers, and harder for people trying to help you when they don't know what other people have said on the other thread.
As I pointed out in the JavaScript questions thread where you posted this first, you can't really change that inside the event - by the time any event commands are executed, the event has already turned because that's what the engine does when you activate an event.

You could probably figure out how the engine stores the event's original facing and reference that, but I bet you'd still see a flicker as the event faces the player and then your code turns it back.

In order for it to actually be seamless in the way you want, you'll need a plugin that modifies what happens when you activate an event, as I mentioned to you before.

Just as a tip, it is generally a bad idea to do what is called cross-posting in forums, wherein you post the same question in multiple places. It makes it more confusing for you to get different answers, and harder for people trying to help you when they don't know what other people have said on the other thread.
oooh got it!! Sorry! I was just realizing that my issue was maybe not so much Java oriented after all and might be better to ask in a more appropriate place. I will be sure to avoid such in the future! As for a plugin option, I guess I will start looking for one to work with what i need. Thank you!
@AlphaOmega have you read my suggestion in post #6?
that has the requirement to change the sprite itself when the event changes move direction (instead of when the interaction is triggered), but if that is possible then it would solve your problem without any plugin or javascript or complex event commands...
@AlphaOmega have you read my suggestion in post #6?
that has the requirement to change the sprite itself when the event changes move direction (instead of when the interaction is triggered), but if that is possible then it would solve your problem without any plugin or javascript or complex event commands...
hmm i hadnt thought of that, ill see what i can come up with thanks!

Original thread: https://forums.rpgmakerweb.com/threads/sprite-change-according-to-direction-event-player-interaction.144631/