Playing Animation on Map in Javascript

How would you freeze the player, player an animation, and once it's done either set idle (if it doesn't do it on it's own) all on the map? I'd prefer to understand how instead of being referred to a plugin if possible, as I'm still learning a lot of the API.

I've noticed this:
 

Game_Actor.prototype.startAnimation = function(animationId, mirror, delay) { mirror = !mirror; Game_Battler.prototype.startAnimation.call(this, animationId, mirror, delay);};but it's all I've seen that really 'starts' an animation possibly. I don't see anywhere to set a sprite sheet to do it, only and ID which I have no idea where it comes from if you're trying to play one on the player from a sprite sheet. Is there a more drawn out process for this?

In advance of a response (hopefully), thank you. I know I've asked a few questions in the few days I've been here, and some of them may be dumb or obvious (or maybe I just feel that way). It really is helping me see the way these functions work and learn pretty quickly. So again, thanks!

🙂
How would you freeze the player, player an animation, and once it's done either set idle (if it doesn't do it on it's own) all on the map? I'd prefer to understand how instead of being referred to a plugin if possible, as I'm still learning a lot of the API.

I've noticed this:

Game_Actor.prototype.startAnimation = function(animationId, mirror, delay) { mirror = !mirror; Game_Battler.prototype.startAnimation.call(this, animationId, mirror, delay);};but it's all I've seen that really 'starts' an animation possibly. I don't see anywhere to set a sprite sheet to do it, only and ID which I have no idea where it comes from if you're trying to play one on the player from a sprite sheet. Is there a more drawn out process for this?

In advance of a response (hopefully), thank you. I know I've asked a few questions in the few days I've been here, and some of them may be dumb or obvious (or maybe I just feel that way). It really is helping me see the way these functions work and learn pretty quickly. So again, thanks!

🙂
To clarify the terminology: when something in RMMV refers to an "animation", it means one of those visual effects you can set up in the Animations tab of the Database Editor.

In this case, for example, the ID would be the id number of said animation.

Sideview-battle sprites movements are called "motions".

Map sprites don't normally have any other type of movement besides the stepping animation, which simply cycles through the 3 sprites in the current direction row while _stepAnime or _walkAnime are true for the character.
If you want to play a database animation over a character on the map ( event or player ) you can use the .requestAnimation() from Game_CharacterBase

Example:

$gamePlayer.requestAnimation(animation id)// or for event:$gameMap.event(EVENT ID).requestAnimation(animation id)You can also do this with the Event Command, Show Animation. 2nd tab, 1st column under character. 
Thanks for that. 🙂

I was hoping, however, there was a way to still set a sprite and play it as an animation on the map. Surely this is possible, as people have made action battle and other things like separate run sprites that play. If anyone could at least point me in the right direction for that it'd be absolutely wonderful.
Well lets see here, just call the Sprite_Base startAnimation function to display an animation easily. 

Can you clarify, do you want to run the built in animations or a separate sprite animations?

I think Iavra has made a plugin that you could look at.
I'll check that. I'm trying to make separate sprite animations. From my understanding the built in animations are are not 2d, and wouldn't work. I'm trying to change player, follower, and npc animations on the fly for a ton of different things. Just no idea where to start to even look, and tried digging for a while but it's incredibly time consuming, so I was hoping someone knew already. 🙂

Where is sprite_base located? I don't see it in core, manager, or objects script. 

Also lavra's animate plugin is a move, or tween plugin it looks like, which can make movement animations, but I don't see where it sets a new sprite animation and plays it.
Edit:

Answered this myself. Check character name for the sprite and move commands to play them. I'm sure there are other ways (still researching) but this is a start for anyone wondering where to start.

Original thread: https://forums.rpgmakerweb.com/threads/playing-animation-on-map-in-javascript.51285/