2 Direction only charset format

Edit: Id like to add that I've tried to see if this script already exists. but honestly I don't know what such script would even be called. I'm assuming however it does not yet exist.

Hello! 

The idea of the script is to only focus on characters left and right frames and not the up and down (however if event is direction fixed, it may be an exception) so when going up or down the frames will remain at the last direction used whether it is left or right. 

for instance:

If I walked left and then up, the character would remain faced left while moving up.

If I walked right and moved down, the character would remain faced right while moving down.

If I walked right and then up, the character would remain faced right while moving up.

If I walked left and moved down, the character would remain faced left while moving down.

I personally think this should be one of the easiest script requests out there, but I wouldn't know really since I don't quite know how to do it myself yet. either way I am going to try to explain myself as best as I could and explain my reasoning behind this.

I wanted my game to be a side scroller so I used the arc engine by Khas (I think) and created charsets like this for example:

Spoiler
[IMG]https://imagizer.imageshack.us/v2/117x216q90/856/4g9j.png[/IMG]
all of the characters in my game are besically set up that way (which I love and have enjoyed making SO MUCH)

however the flat sidescrolling of the Arc engine is just not enough for the kind of game I am making... what I had in mind was more like Adventure quest online! CHECK OUT THE SCREENSHOTS TO UNDERSTAND.

Spoiler
[IMG]http://mmohuts.com/wp-content/gallery/adventure-quest-worlds/adventure-quest-worlds-browser.gif?ec9f9b[/IMG][IMG]http://www.mmobomb.com/wp-content/uploads/2011/02/Adventure-Quest-worlds-2.jpg[/IMG]
Notice how all the characters despite being lower or higher are all faced either left or right... there is no up or down sprites. and thats what I would like to achieve instead of a plain 2d side scrolling engine (with countless bugs if I may add). just a one script that will only use the left and right frames of a character. 

What is the purpose you ask? It will let the possibility of creating a form of a side scrolling game (but not really) and still letting the classic exploration element of rpg remain in your game. the kinds of maps I would make is very similar to adventure quest, the exploring of maps would still go from left to right (or vice versa) but would enable the moving from up and down. 

Other games like that, that you can check videos of for better understanding are:

like we said, ADVENTURE QUEST ONLINE

ShadowTale Online

Puppet Guardians

Epic Duel

you get the idea I hope.

In rpg maker vx ace it would be lovely

Spoiler
[IMG]https://imagizer.imageshack.us/v2/538x408q90/841/3mez.png[/IMG][IMG]https://imagizer.imageshack.us/v2/419x133q90/703/s1eh.png[/IMG]
this is something I threw together REALLY fast to just give you the idea of what I am planning, to explain that up and down arent necessary in this type of game, and yet it will still be a fully functional rpg game with a just different way of charsets use.

SUMMARY

no complicated features or unrealistic expectations, simply one thing like I stated above

If I walked left and then up, the character would remain faced left while moving up.

If I walked right and moved down, the character would remain faced right while moving down.

If I walked right and then up, the character would remain faced right while moving up.

If I walked left and moved down, the character would remain faced left while moving down.

there is no better way to explain this 🙂

let me know if there is any other way I can explain this and I will ^^ I know it's sometimes hard to get the ideas some people might have.

so first of all I would like to thank you for reading this! I really appreciate your interest! Credits will always be provided and I would encourage to whomever takes upon this script request to release it as their own for others to use! it'll be a great opportunity for that type of game! 

again thank you!
Your profile says you are using XP, but you posted this request in the RGSS3 (VX Ace) Script Requests forum. Which maker are you using?
vx ace! sorry did not realise I had it on my profile! I switched a while ago

thank you for pointing that out, Ill change it immediately
Paste into a new slot below your other scripts. When a map is first loaded, if your events are facing up or down, they will all change to face either left or right randomly.

Code:
class Sprite_Character < Sprite_Base  #--------------------------------------------------------------------------  # * Update Transfer Origin Rectangle  #--------------------------------------------------------------------------  def update_src_rect    # Only face left/right    if [4,6].include?(@character.direction)      @sprite_direction = @character.direction    elsif !@sprite_direction      @sprite_direction = [4,6][rand(2)]    end    if @tile_id == 0      index = @character.character_index      pattern = @character.pattern < 3 ? @character.pattern : 1      sx = (index % 4 * 3 + pattern) * @cw      sy = (index / 4 * 4 + (@sprite_direction - 2) / 2) * @ch      self.src_rect.set(sx, sy, @cw, @ch)    end  endend
Awesome! thanks, just one thing.

I did also mention the "exception" if an event is direction fixed. basically saying if its direction fixed while facing down, then facing down it should stay. you know what I mean?

also just one thing to add to that (which I don't know if it'll be as easy to do S: ), that another thing to be an exception is when going up a ladder. the character will face up. 

EDIT:

or even better! if I can put [fixed] or something like that at the name of the event. this script will not effect it. so it will effect everything except for any events with [fixed] in them. for example "[Fixed]chest" that will be faced down!
oh, sorry. I do remember reading the note about direction fix, and then I forgot it 🙂

Try this instead:

Code:
class Sprite_Character < Sprite_Base  #--------------------------------------------------------------------------  # * Update Transfer Origin Rectangle  #--------------------------------------------------------------------------  def update_src_rect    # Only face left/right unless on a ladder or direction_fix    if @character.ladder? || @character.direction_fix || [4,6].include?(@character.direction)      @sprite_direction = @character.direction    elsif @old_direction       @sprite_direction = @old_direction    elsif !@sprite_direction      @sprite_direction = [4,6][rand(2)]    end    @old_direction = @sprite_direction if [4,6].include?(@sprite_direction)    if @tile_id == 0      index = @character.character_index      pattern = @character.pattern < 3 ? @character.pattern : 1      sx = (index % 4 * 3 + pattern) * @cw      sy = (index / 4 * 4 + (@sprite_direction - 2) / 2) * @ch      self.src_rect.set(sx, sy, @cw, @ch)    end  endend
its great thank you 🙂
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/2-direction-only-charset-format.25793/