How do you check if the skill is being used by a specific actor? [SOLVED]

Sorry if this question was already asked in the forum :c, but I'm not sure I can find the post. Sorry in advance :rswt2:.

I would like an actor to use a skill and when using it to save his ID in a variable. I know that it can be made easier by putting the same skill for each of the actors, but I prefer to do it with the variable that seems most correct to me xd. Is there any way?

Thanks for reading!
You can...but there may be a better way to do whatever you're using it for. What exactly are you saving the ID to accomplish?
You can...but there may be a better way to do whatever you're using it for. What exactly are you saving the ID to accomplish?
It's a bit complicated xd. I am developing a chain attack. The first actor to use that skill will be the one who makes the attack first, then the player decides between the second, third and fourth actor. That's why I need to save the ID in a variable of whoever uses the chain attack skill. It's all finished, I would only be missing the part I asked about.
There are a bunch of ways to do this, and the best one kind of depends on how you're implementing all the rest of that.

But if you want to get it as soon as possible, before the skill starts to execute, you'd use Yanfly's Skill Core and give the skill the notetag:
Code:
<Before Eval>
$gameVariables.setValue(69, user.actorId());
</Before Eval>

That will store the user's ID in variable 69.
Hay muchas formas de hacer esto, y la mejor depende de cómo implementes el resto.

Pero si quieres obtenerlo lo antes posible, antes de que la habilidad comience a ejecutarse, usarías el Skill Core de Yanfly y le darías a la habilidad la etiqueta de nota:
[CÓDIGO]<Antes de la evaluación>
$gameVariables.setValue(69, usuario.actorId());
</Antes de la evaluación>[/CODE]

Eso almacenará la identificación del usuario en la variable 69.
thank you so much! ☺️ I had some problems because the skill I used did not have the "action effect" that applies the effect of the skill, which, being a skill to call others, did not have an effect, so the variable was not saved with the <before eval> without the "action effect"😅, but now it's solved 👍.
If you're using action sequences, the very first action sequence pack has commands listed right in its instructions to set variables.

Code:
change variable 69 = user.actorId()

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-check-if-the-skill-is-being-used-by-a-specific-actor-solved.162309/