MZ How to show Animations anywhere during Battle in Javascript

In the map, we can show battle animations anywhere using Show Animation on the event commands. Can we do it during a battle without an actor using a skill? For example, giving the function an x and y values to know where the animation will be.

Is this possible?
You can use the troops battle event section to run the same functions you would in the map!
Spoiler
Captura.PNG
[edit] Just noticed that might not cut it. For specific area animations you need to run scriptings or adding a temporary invisible enemy to target with...
You can use the troops battle event section to run the same functions you would in the map!
[edit] Just noticed that might not cut it. For specific area animations you need to run scriptings or adding a temporary invisible enemy to target with...
Thanks. Will try the invisible enemy. But can you also point me where to start on how I can do this with Javascript?
Thanks. Will try the invisible enemy. But can you also point me where to start on how I can do this with Javascript?
I feel pretty certain that I saw someone link you this list of script calls just a little while ago. No offense, but it might be more time efficient (on everybody's part, including your own) if you try to check there first before asking this kind of stuff. I'll give you a hint and tell you to check the "Battle" section.
I feel pretty certain that I saw someone link you this list of script calls just a little while ago. No offense, but it might be more time efficient (on everybody's part, including your own) if you try to check there first before asking this kind of stuff. I'll give you a hint and tell you to check the "Battle" section.
I'm not talking about the invisible enemy. I need help in where to start on how to show animations anywhere during a battle. On what Javascript functions I should check out. Because I'm already taking a peek on the event command's functions and I still have no idea specifically where to start right now.
It's literally right there, at the spot that I linked to you.

ShowAnimation.png


@myenemy was saying to put an invisible enemy at the spot where you want the animation to happen, and then to use that command to target the invisible enemy with the animation.
I thought he gave me two ways: targeting an invisible enemy and by pure scripts. I thought I'll go first with scripts and if I can't do that then I'll do the invisible enemy.

I apologize because I wasn't clear. I will also try the invisible enemy.
It's all good. If you want the animation to directly target a set of coordinates, without using the invisible enemy workaround, then you're going to have to create a plugin for it. That would require some core functions to be altered, so it's not something that can be accomplished with built-in script calls. There are already some plugins that do this, but AFAIK, they actually use the invisible target workaround.

But if you're interested in pursuing this route, then I'd recommend that you take a look in rrmz_objects, at the Game_Temp.prototype.requestAnimation method. Try to understand how it operates, and then just follow the trail. From there, it'll lead you to rmmz_sprites.js, to the Spriteset_Base.prototype.createAnimation method. Continue following the trail, while understanding everything along the way, and you'll eventually wind up at the Sprite_Animation.prototype.targetPosition method.

If you can get that far, and understand everything along the way, then you'll probably be able to create a plugin that allows you to play an animation at a specified point without using the invisible person workaround.
I thought he gave me two ways: targeting an invisible enemy and by pure scripts. I thought I'll go first with scripts and if I can't do that then I'll do the invisible enemy.
I did

Original thread: https://forums.rpgmakerweb.com/threads/how-to-show-animations-anywhere-during-battle-in-javascript.148722/