Catch the ID of the caster in a Variable

Hi, So I will be quick.
I'm actually on RPG Maker MV and I want to try to make a (in fact many) skill. But I don't know how I can With/Without a plugin do this.


My problem is that I want my skill "Awaken Blade" make three things:


- Give to the actor a State that boosts Attack and Defense.


- Hit all foes with an attack, but it has a different element following who's is doing the Skill (if its A so it's a Fire attack, if its B it's a Wind attack)


- Create a Gab Window (Yanfly Script http://yanfly.moe/2015/12/18/yep-46-gab-window/) with the face of the X actor.


So, what I was thinking is a plugin that put the Caster ID (Actor 1, or 2, or 3) on a variable to do so. Then I could create the skill with 3 common events, one for give the State to the Actor who is on the variable, and the second to do the skill with the correct element. And then a third to create the Gab Window depending of who is the caster.


So, I write this post to ask you how can I "take the ID of the caster" and put it on a variable.


Thanks you 🙂
you can use code in the damage formula of any skill, including if statements and access to variables - there is a topic specifically about that where you can check which javascript code to use for that.


this info can theoretically be used in a common event - because the common events called by skills are usually processed at the end of the battleturn - but that can mess with your timing or displays if several common events go off that way.


Additionally, only one common event can be called by a skill - if you call several, only one will be processed.


I think your best chance would be a combination of the damage formula coding and the action sequences of yanfly's battle plugins.

Original thread: https://forums.rpgmakerweb.com/threads/catch-the-id-of-the-caster-in-a-variable.67594/