MV Change Actor Spritesheet When Moving

Hello, I made this thread because googling the problem didn't help.

I'm working with RPG Maker MV. I need my player character to change sprite sheets when moving. This is for animation reasons. RPG Maker wants to have a sprite sheet that contains a "standing still" frame to revert back to when the actor isn't moving. The walk cycle i made does not have this, it makes the animation look more natural.

So I need to be able to make it check when an arrow key is pressed, vs. being released. While the arrow key is pressed, the actor's sprite sheet can change. When the key is released, it goes back to the original sheet.
I've been able to achieve this in a common event, but it only works for a single direction. Any other directions I put in, either in the same common even or separate ones entirely, it ignores.

7dc066dbbb21faf006595af2021db9ad.png


I realize there has to be a branch for each key press, this is just showing one as an example.

Has someone possibly made a plugin for issues like this? I know i've seen some for idle animations that work via a script in the actor note. I wasn't able to find anything for this kind of purpose. Any suggestions are appreciated.
Moved to: Plugin Requests
Hello welcome.
Try this:
Code:
◆If:Script:!$gamePlayer.isMoving()
  ◆Comment:Stopped
  ◆
:Else
  ◆If:Script:!$gamePlayer.isDashing()
    ◆Comment:Walking
    ◆
  :Else
    ◆Comment:Dashing
    ◆
  :End
  ◆
:End

the exclamation point serves for the opposite situation to what it asks for, marked with "comment".
Hello welcome.
Try this:
Code:
◆If:Script:!$gamePlayer.isMoving()
  ◆Comment:Stopped
  ◆
:Else
  ◆If:Script:!$gamePlayer.isDashing()
    ◆Comment:Walking
    ◆
  :Else
    ◆Comment:Dashing
    ◆
  :End
  ◆
:End

the exclamation point serves for the opposite situation to what it asks for, marked with "comment".


Thank you so much! That's exactly what I needed. Much appreciated. 🙂
For anyone looking to do the same set up as this, without the use of plugins:

I set up these branches to check the conditions needed for RPG Maker to tell when you're walking, standing still or walking and dashing. This was especially useful to be compatible with Shaz's More Character Frames plugin. (Also it helped to have it check for dashing + moving so it wont change the sprite sheet just for holding down shift.)

Big thanks again for the help on this thread. : D
I forgot that "isDashing" returns true even when the character doesn't move.

Two tips:
Don't put comments at the end of the event, always at the beginning so you can know where you are, but this is optional, if the event is small you don't even need to use it.

You also don't need to check if you're moving twice, the ELSE of the first one will already do that:
Code:
◆If:Script:!gamePlayer.isMoving()
  ◆Comment:Stand still
  ◆
:Else
  ◆If:Script:!$gamePlayer.isDashing()
    ◆Comment:Walking
    ◆
  :Else
    ◆Comment:Running
    ◆
  :End
  ◆
:End
Hello welcome.
Try this:
Code:
◆If:Script:!$gamePlayer.isMoving()
  ◆Comment:Stopped
  ◆
:Else
  ◆If:Script:!$gamePlayer.isDashing()
    ◆Comment:Walking
    ◆
  :Else
    ◆Comment:Dashing
    ◆
  :End
  ◆
:End

the exclamation point serves for the opposite situation to what it asks for, marked with "comment".
Sorry for reviving this thread, but I didn't want to start an new one when the topic seems to be already solved (at least for others ^^).
I had the same idea and searched for a solution. This one seems good, but I don't know how to use it.

Let's say I want to use the spritesheet "walk.png" when walking (and standing still) and "run.png" when running/dashing. What do I have to add to the code to tell the game what spritesheet to change to?

Thanks in advance 🙂

Original thread: https://forums.rpgmakerweb.com/threads/change-actor-spritesheet-when-moving.138626/