How to move a player with no walking animation via script?

Hello, I am making a script that under certain conditions moves the game player.


However, I need the character to not have movement animation when moving (akin to unchecking the Walking box on an event's option panel).


How do I set and unset that option via JS?


Thanks!
Hello, I am making a script that under certain conditions moves the game player.


However, I need the character to not have movement animation when moving (akin to unchecking the Walking box on an event's option panel).


How do I set and unset that option via JS?


Thanks!
Code:
$gamePlayer.setWalkAnime(false);
$gamePlayer.setWalkAnime(false);



This is returning undefined though: 


console.log("walkin anime: " + $gamePlayer.walkAnime);




Any idea why would that be the case? 
This is returning undefined though: 



console.log("walkin anime: " + $gamePlayer.walkAnime);




Any idea why would that be the case? 

What exactly are you trying to do there? This function isn't supposed to return anything. It sets a variable.
What exactly are you trying to do there? This function isn't supposed to return anything. It sets a variable.



I am trying to debug the current state of the gameplayer's walkAnime.


I am setting


$gamePlayer.setWalkAnime(false);


but my character still has a Walk Animation.
I am trying to debug the current state of the gameplayer's walkAnime.


I am setting



$gamePlayer.setWalkAnime(false);


but my character still has a Walk Animation.

I have tested


$gamePlayer.setWalkAnime(false);


And it definitely turns off the walk animation for the player and their party.


If you need to check whether the player has a walk animation, use


$gamePlayer.hasWalkAnime()


It will return true if they do, return false if they don't.
I have tested



$gamePlayer.setWalkAnime(false);


And it definitely turns off the walk animation for the player and their party.


If you need to check whether the player has a walk animation, use



$gamePlayer.hasWalkAnime()


It will return true if they do, return false if they don't.



Thanks, that did the trick! 🙂


Do you happen to know how to get/set player's movement speed as well?

Original thread: https://forums.rpgmakerweb.com/threads/how-to-move-a-player-with-no-walking-animation-via-script.62267/