[solve]Use only left and right walk animation

I plan on make a large sprite game
And nearby side scroll map but still can walk up down about 3-5 tile
Problem is I want to disable walk up and down animation
And use the R/L instead in the same direction before up/down
Can’t find how to do this

Thank you for Every Help
.
Ps. For reason I do the sprite myself and that a load work with up down that not really necessary for my game
1.
When you start the Game you can turn the player right or left and Set direction Fix to ON for the Player with the Eventcommand Set Movementroute.
And Set Switch 1 for example to On.
If you need help doing that let us know.
2.
Create a Paralell Common Event with Switch1 as Run Condition.
And insert the Code from the Picture: (In the Picture i used a normal Event for that map, common event will work for all maps)
leftrightmovement.PNG
Does that work if you use the mouse to move the character? (I assume it wouldn't but it might simulate the button press commands.)
thank you bex
and like dulsi say it's not immersive experience
when the game allow to use mouse
maybe I will reconsidering about do updown animation
or just use R/L paste on U/D like now and move around
this is not the main part of the game anyway
This is a good concern, it would not change direction when moving with mouse.
But iam sure with the correct commands that could be adjusted. I dont know Scriptlines for checking mouse click and or mouseclick coordinates.
One thing you could do is modify the sprites. Change the up sprites to be the same as left and the down sprites to be the same as right. It won't do exactly what you want as it may change your direction but it is a quick fix.
I think the attached plugin should do it, if you want to try it out. Full code is in the spoiler~
Spoiler: Code
Code:
/*:
 * @plugindesc Ignores attempts to make characters face up or down.
 * @author Caethyril
 * @help Free to use and modify.
 */

(function() {

'use strict';

	let _Game_CharacterBase_setDirection = Game_CharacterBase.prototype.setDirection;
	Game_CharacterBase.prototype.setDirection = function(d) {
		if (![2,8].contains(d)) _Game_CharacterBase_setDirection.call(this, d);
	};

})();

// To affect only the player, replace all 4 "Game_CharacterBase" with "Game_Player"
caethyril thank you
it's work like charm but with small problem
the player can't activate event with action button in top or down side
but player touch and event touch still work
I think it's check face direction
but your help is really great now
thank you
Hmm, yes, you need to face events to trigger them with the action button, I don't see an easy way to code an exception. v_v

What you could do is make those events Player Touch and use a branch to check if the button is pressed, e.g.
Code:
◆If:Button [OK] is pressed down
  ◆Text:None, Window, Bottom
  :    :Hello!
  ◆
:End
Hmm, yes, you need to face events to trigger them with the action button, I don't see an easy way to code an exception. v_v

What you could do is make those events Player Touch and use a branch to check if the button is pressed, e.g.
Code:
◆If:Button [OK] is pressed down
  ◆Text:None, Window, Bottom
  :    :Hello!
  ◆
:End
Thank you
I had test it and it work with keyboard
but with mouse still no luck
but this is enough thank you very much

ps. I use http://yanfly.moe/2018/12/21/yep-176-event-proximity-activate-rpg-maker-mv/
this plugin to combine check with your code and it work great

Original thread: https://forums.rpgmakerweb.com/threads/solve-use-only-left-and-right-walk-animation.105648/