MV <Solved>How to solve Script Call stops Walk animation?

I used a translator because I was not fluent in English. I'm so sorry.
---------------------------------------------------------------------------------------------------------

I am a Pixel Movement Plugin and Cross engine user.
My goal is Top Down 2D Action Adventure Game.

-----------------------------------------------------------------

I'm using the Script Command to create an event where Player Characters are forcibly pushed out.

Code:
$gamePlayer.locate($gamePlayer.x,$gamePlayer.y + 0.05);

This is the code. Push the player out with the parallel event.
This was possible with the function of returning coordinates below decimal points made possible by Plugins.

So far, it's working well. Almost.

The problem is that Player Character's Walk Animation does not work when Event is active.
No bugs were found in Console Log.


It seems that the Script Command is resetting Player's Sprite Animation.

I think there might be a way to solve this problem somewhere in Default js,
but I'm a beginner in Java Script, so I don't know what to do. Please help me.



----------------------------------------------------------------------------------------------------------



I don't think this is an error involving Plugin, but I'll attach a plugin link.
Spoiler: Links
Yanfly Core Plugin to get rid of minor bugs

Altimit Pixel Movement 0.50 beta

Chrono engine
Unfortunately, Chrono Engine's Original Post has disappeared.
It seems that MOG is rebuilding blogs.
I attached an alternative link, but it includes multiple plugins.

This is an archive link.

Cross engine


I also attached a demo, so please refer to it if necessary.

The default js Script version of the demo is 1.5.0.
It is running on editor version 1.6.1.


Thank you for any advice.
It seems that the Script Command is resetting Player's Sprite Animation.
yes
any regular move command has to start with the first step, and changing that would be much more complex.

have you tried adding waits to the parallel process? Those will not only reduce lag, they also allow for the character to continue or complete the move animation.
yes
any regular move command has to start with the first step, and changing that would be much more complex.

have you tried adding waits to the parallel process? Those will not only reduce lag, they also allow for the character to continue or complete the move animation.
Thank you for your answer.
It took time to smooth out grammar and words.

As a result of the test,
Walk animation began to play from 10 frames.
Walk Animation worked normally when wait 40 frames.
As you said, the load has also decreased.

However, it took too long to be pushed out.
I added coordinate values in the code, but it became like a teleport.

I've experimented with tricks that put events on top of players, but it doesn't seem easy to play motions other than walking.
(In the final version, it swings a sword and jumps)
Now I'm looking inside for modify the core script, but I haven't achieved any significant results yet.

Is there any other alternative functions or tricks?
Is there any other alternative functions or tricks?
go a completely different route:

activate the stepping animation on the player with a tergeted set moveroute command. That will make it look as if the player is walking in place.
then simply block the movement by passability.

the tricky part of that solution is to disable the stepping animation in time when the player stops trying to walk or walks in a different direction. If you disable stepping too late it will look as if he is walking in other places when trying to stand.

EDIT:
one solution might be to take the control away from the player for a short while.
trigger the barrier event on player touch
give the player stepping animation
wait 60 frames
remove stepping animation from player

that will take away the control from the player for that 60 frames and it will look to the player as if the actor tried to go there for a second before giving movement control back to the player.
Two ideas:
  1. Use setPosition instead of locate, e.g.
    JavaScript:
    $gamePlayer.setPosition($gamePlayer.x, $gamePlayer.y + 0.05);
    locate is basically setPosition plus some refreshes (stepping frame + bush depth).

  2. Or you could try something like this:
    JavaScript:
    $gamePlayer._y += 0.05;
    It needs to be _y because the y property is read-only.
Thank you for answers guys.

EDIT:
one solution might be to take the control away from the player for a short while.
trigger the barrier event on player touch
give the player stepping animation
wait 60 frames
remove stepping animation from player

that will take away the control from the player for that 60 frames and it will look to the player as if the actor tried to go there for a second before giving movement control back to the player.
Depending on the adjustment, it will be a good alternative.
It's sad to move away from real-time, but I think it's a better way compared to giving up Feature.

Thank you for your advice.


Now I'm looking at Plugin Scripts as a last resort and looking for Functions.

Two ideas:
  1. Use setPosition instead of locate, e.g.
    JavaScript:
    $gamePlayer.setPosition($gamePlayer.x, $gamePlayer.y + 0.05);
    locate is basically setPosition plus some refreshes (stepping frame + bush depth).
I just found the same function from chrono engine.js.
I'll test it and come back again.
Yes!

'setPosition' is right!

Now Walk Animation works perfectly with features!

Thank you for help, caethyril, Andar!


Your answers made me not to give up on this issue.

Thank you so much Again!
Double-post notice: @Nspace

Thread closed

(You can just report your post and let us know you have a solution - then we will close the thread for you)

Original thread: https://forums.rpgmakerweb.com/threads/solved-how-to-solve-script-call-stops-walk-animation.141418/