Electrified skeleton effect

I have a state called Shock which caused an actor to take damage if they use a magical ability. I wanted to have an electrified skeleton effect when the state applies. I want to use the same skeleton for every actor.

I was thinking of using something like the BattleCore action sequence command MOTION: Motion Type, just supplying my own image, except that's not what the command does. I could make the actor invisible and apply an overlay for a second, but that seems fiddly. Is there a better way to do this? I have the VisuStella 8 Waves plugins.

Edit: the INJECT plugin command was the way to go. It works great inside the Common Event of the skill:
Code:
◆Plugin Command:VisuMZ_1_BattleCore, INJECT: Animation Begin
:Plugin Command:Targets = ["current target"]
:Plugin Command:Filename = Shock
:Plugin Command:Horizontal Cells = 4
:Plugin Command:Vertical Cells = 1
:Plugin Command:Frame Delay = 16
:Plugin Command:Smooth Bitmap? = false
:Plugin Command:Offset =
:Plugin Command:Offset X = +0
:Plugin Command:Offset Y = +0

However, I want to to also play inside the Shock state when the actor casts a spell. He's the code of interest (the rest of it inside the <JS Post-Damage as User> works):

Code:
<JS Post-Damage as User>
PluginManager.callCommand(this, "VisuMZ_1_BattleCore", "INJECT: Animation Begin", {
  Targets: ["user"],
  Filename: "Shock",
  HorizontalCells: "4",
  VerticalCells: "1",
  FrameDelay: "30",
  SmoothBitmap: "false",
  Offset: "",
  OffsetX: "+0",
  OffsetY: "+0"
});
<JS Post-Damage as User>

As suggested, I also tried "ActSeq_Inject_AnimationStart" instead of "INJECT: Animation Begin", but neither works.

Next I tried a simpler command, just to see if any of the BattleCore plugin commands could be called within a state notetag. Again, nothing:

Code:
PluginManager.callCommand(this, "VisuMZ_1_BattleCore", "ANIM: Show Animation", {
  Targets: ["user"],
  AnimationID: "65"
});

Two questions:
1) Is there a reference for the command names to use as arguments for callCommand? I'm assuming the BattleCore documentation name is the one to use.
2) Can I even call a plugin from a state notetag, or does that screw up the context?
I think you could add them, I do have some lightning effects
as brush I could add to it.

but what color has it to be? just some lightning, or lightning around
the sprite entirely?

any vision/visual way you want it to look like?
I think you could add them, I do have some lightning effects
as brush I could add to it.

but what color has it to be? just some lightning, or lightning around
the sprite entirely?

any vision/visual way you want it to look like?
I'm okay doing the graphics myself, thanks, I'm just wondering how to best implement the effect in code.
adding the effect in code is something I don't know.
adding them to the spritesheet is simple change the dmg sprite.
probably something with a notetag "<electrified>" during dmg.

but I have no idea, but it does give a cool effect that I remember in
some games (same with fire, ice in different damage sprite based on skill).

so if you want it to be coded, than a coder has to look at it.
So you were trying to do the stuff in the action sequence in the skill which applies the state? Then you can use just change actor image event command, like change/wait/change/wait/change...Or if you want to do some fancy sprite sheets for all the different actors, you can use INJECT in the action sequence.
I think you could just create three or four frames of the electrified skeleton and change actor's image with a brief pause.
So you were trying to do the stuff in the action sequence in the skill which applies the state? Then you can use just change actor image event command, like change/wait/change/wait/change...Or if you want to do some fancy sprite sheets for all the different actors, you can use INJECT in the action sequence.
INJECT does the job! Thanks again

So you were trying to do the stuff in the action sequence in the skill which applies the state? Then you can use just change actor image event command, like change/wait/change/wait/change...Or if you want to do some fancy sprite sheets for all the different actors, you can use INJECT in the action sequence.
I can run the INJECT just fine from within the skill via a Common Event. Is it possible to run from within the Shock state itself? I cannot get it to run. I thought it was because the Targets parameter could not understand "current target" in this context, so I put the target actor in variable 30 and made the target "[actor id var 30]" (I'm using the Art_BCTargetExtension plugin). Again, this works in the Common event, but not in the state. The console.log returns the correct values.

Code:
<JS On Add State>
console.log("Zap " + target.name() + " " + target.actorId());
$gameVariables.setValue(30, target.actorId());
PluginManager.callCommand("VisuMZ_1_BattleCore", "INJECT: Animation Begin", {
  Targets: ["actor id var 30"],
  Filename: "ShockAnimation",
  HorizontalCells: "4",
  VerticalCells: "1",
  FrameDelay: "30",
  SmoothBitmap: "false",
  Offset: "",
  OffsetX: "+0",
  OffsetY: "+0"
});
console.log($gameVariables.value(30));
</JS On Add State>
Don't you at least need the interpreter reference there? So add "this" in there. Also, I think your command name was wrong. (It also says the use of those commands requires VisuMZ_3_ActSeqImpact)

PluginManager.callCommand(this, "VisuMZ_1_BattleCore", "ActSeq_Inject_AnimationStart", {
INJECT does the job! Thanks again
I can run the INJECT

@jshunter , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/electrified-skeleton-effect.178929/