MV Create idle animation by adding diagonal movement and mouse systems

Create idle animation by adding diagonal movement and mouse systems. Hello, I can't create idle animation. I've tried several methods, but I'm not getting satisfactory results. For example, sometimes the character gets stuck during the graphic transition; pressing a key doesn't make the character change; it slides, etc. I'm trying to use a plugin command for graphic changes that make the character blink, thus updating the graphics during movement. The character doesn't change the graphics with mouse clicks. This is something I need to add because I already have a system that moves the character through clicks. In general, I want to add a pose-based animation system, changing poses with a random variable at each stop.

In my attempts, I had trouble finishing the animation and loading the walking animation in a timely manner. I've included some images of the systems used.

Etermidade1-bugs4.png



Etermidade1-bugs3.png


Etermidade1-bugs2.png


Etermidade1-bugs.png
Can I be honest? This part makes no sense at all:
See, in the condition that controls the "Movimento" variable, you put the condition. This is confusing, why change the variable and then check if this will only happen when the key is pressed?

Another strange thing is using JAVASCRIPT to check the key pressed when this is a native option:
1758410216499.png


The same situation with the variable followed by the IF happens here:

This part can generate several problems, common events in sequence are not necessary if they are already working in parallel process:

I believe part of the problem is trying to use "Definir Rota de Evento" to change the player's graphics.
Probably the best way would be to create common events combined with Javascript using the RMMV API, here are two examples:
In the system, movement controls the player. In this section, I can assign movement to other characters and events if the "Movement" variable varies in numbers, from 1 to 8.
Unlike the "If the player is pressing the key" event condition, the "Input.isPressed" command works much better, is more responsive, and guarantees bug fixes in a projectile system.
Image 1 - bug 5
Eternidade 1- Bug 5.png

The movement variable also controls the controller HUD.
Image 2 - bug 6
Eternidade 1- Bug 6.png

It is part of the game's HUD system.
Regarding using the native option or Javascript, because the system is diagonal, the native option doesn't respond well to gameplay.

The mouse system also activates the controller HUD, changing the graphics with each mouse click. It's exactly like the gamepad control system. Regarding calling common events, it should happen at the beginning of the game. I could even try to call them all together, but it's better to call them separately for FPS control. Since it's at the beginning, it works well.
Yes, the part that's causing me trouble is changing the graphics. I've already done this system once, and it worked very well.
If I remember correctly, I changed it within the movement system, so that the entire group would have their poses at the same time.
I called a random variable to change the animation variable, but doing this is a problem. I have a parallel process, and this random animation variable can only run once to choose the correct pose. I'm not able to isolate it outside of the parallel event.
The problem is simple to solve; it's basically an idle character animation, which I'll probably have to put within the movement system and set a condition that executes along with mouse clicks.
This doesn't explain why using "SE" right at the moment of changing the variable's value won't change the effect:
I can assign movement to other characters and events if the "Movement" variable varies in numbers, from 1 to 8

Another thing to use is "IF" inside "IF" if you are already using JAVASCRIPT just put "&&" and create just one Conditional Branch:
Code:
◆Se:Script:Input.isPressed("down") && Input.isPressed("left")
  ◆
:Fim
◆Se:Script:Input.isPressed("down") && Input.isPressed("right")
  ◆
:Fim
◆Se:Script:Input.isPressed("up") && Input.isPressed("left")
  ◆
:Fim
◆Se:Script:Input.isPressed("up") && Input.isPressed("right")
  ◆
:Fim

Or you could even save reading events by using the same direction to read the other two possibilities:
Code:
◆Se:Script:Input.isPressed("down")
  ◆Se:Script:Input.isPressed("right")
    ◆
  :Fim
  ◆Se:Script:Input.isPressed("left")
    ◆
  :Fim
  ◆
:Fim
◆Se:Script:Input.isPressed("up")
  ◆Se:Script:Input.isPressed("right")
    ◆
  :Fim
  ◆Se:Script:Input.isPressed("left")
    ◆
  :Fim
  ◆
:Fim

Regarding the problem of movement and graphic changes, I will maintain my point of view, I still believe that changing graphics by character state should be done via SCRIPT command so as not to conflict with other movements in parallel.
The common "Movement" event is a fundamental part of the system, as it directs the game's ABS, depending on the variable number triggered by the button, or in this case, the "mouse."
This is an old version of the system; you can see that the name of the movement variable is "diagonal."
Image 2 – bug 7
Eternidade 1- Bug 7.png

Image 2 – bug 8
Eternidade 1- Bug 8.png


Does this code Script: Input.isPressed("down") && Input.isPressed("left") perform the same function as moving bottom left?
I'm trying something different here.

Image 2 – bug 9
Eternidade 1- Bug 9.png

Image 2 – bug 10
Eternidade 1- Bug 10.png


And the character I want to pose.
Image 2 – bug 11
Eternidade 1- Bug 11.png
Does this code Script: Input.isPressed("down") && Input.isPressed("left") perform the same function as moving bottom left?
I've shown intuitive examples below. "IF" doesn't execute a command; it's used exclusively to check the conditions described.

"&&" is equivalent to the letter "E" in our native language, for example:
"Condição A e Condição B"

As I said before, messing with player graphics using "Set Event Route" will still conflict when the player is walking Diagonally, so I showed the two working examples that I used JAVASCRIPT to solve

Good luck
Part of the system under development. I added mouse clicks to the video to better visualize the system.
The script, !$gamePlayer.isMoving(), actually generates diagonal mismatches.
So I won't use it. I'll try to place the random variable somewhere to generate numbers for the poses. What happens is that it generates the number multiple times in a parallel process. I want to generate it only once and then another over time.
This way, the character could change the graphic depending on this variable.

Original thread: https://forums.rpgmakerweb.com/threads/create-idle-animation-by-adding-diagonal-movement-and-mouse-systems.180185/