(SOLVED) Check if Actor is using a specific skill + conditional dialogue?

I'm working on a talk skill that can be used during battle. Depending on the actor that uses it, it will give different dialogue. Is there any way to check if an actor is using a skill via variables or script calls?


A few things I've tried putting into conditionals that were ineffective:

  1. BattleManager.actor().actorId()
  2. $gameParty.members()[0].isInputting
  3. $gameActors.actor(actorId)
You would have to provide more information (e.g. screenshots) of how you've constructed this skill and how you're trying to use the conditionals.

The first one seems most likely to be what you want, and should work depending on the context. The second one probably would not, because you won't have a skill executing while the player is inputting commands.

The third one is not useful to put into a conditional branch on its own, because that function is returning the actor data for the specified ID - that will always be considered "true".
A few things I've tried putting into conditionals that were ineffective:
Exactly how and where did you try what you did? I haven't checked, but the first looks right, but needs a comparison to some actor id, the second would only work for the first party member, and the third just gets you an actor provided that actorId variable is set

Edit: ninja'd
why not simply attach a common event to the talk skill?
that way the event only runs if the skill is used.

although it would probably need to be a big event with a lot of conditions to detemine which part of the talk is currently used.
why not simply attach a common event to the talk skill?
That could be what the OP is doing, but still needs either a script conditional like was being discussed or some tedious eventing with the dummy state concept to determine which actor is doing the talking.
@ATT_Turan that is actually the smallest part of the problem.
the common event would also need to be able to identify which troop and which anemy are active and a lot more, because from the OP I don't think he meant the talking only between actors but also as part of the battle mechanics.
There is a reason why I mentioned that it would need a big eventz with lots of conditions...
@Andar It seems to me you're presuming things that the OP didn't say 😉

It just says a talk skill, and wants to know which actor selected it. It doesn't say they're talking to the enemies or they need to know which enemies are present or anything about how the skill was implemented (I would've assumed a common event, as that's the easy way to access Show Text).

Anyway, it doesn't matter to me, I just think it's easier to answer the questions asked and they're either what the asker needs, or they'll figure out they need something else as they implement it.
You would have to provide more information (e.g. screenshots) of how you've constructed this skill and how you're trying to use the conditionals.

The first one seems most likely to be what you want, and should work depending on the context. The second one probably would not, because you won't have a skill executing while the player is inputting commands.

The third one is not useful to put into a conditional branch on its own, because that function is returning the actor data for the specified ID - that will always be considered "true"
This is what it looked like most of the time as I was trying to figure out what would stick. (Mostly just changing the scripts in the variables out for the ones mentioned before.

I'm pretty new to RPGMAKER, so I'm still trying to figure out what I'm doing for the most part.

If any more information is needed let me know. What I have right now is a bit lackluster. '😀
1719335366517.png

1719334932258.png
1719334870801.png
At that point in the turn, the skill has concluded so BattleManager.actor() is no longer storing anything.

You could use a plugin like Yanfly's Skill Core to set the variable ahead of time, when the skill is beginning - that would be the easiest thing. You could give the skill the notetag
Code:
<Before Eval>
$gameVariables.setValue(6, user.actorId());
</Before Eval>

Then your common event checks the value in variable 6 just like you're already doing.
At that point in the turn, the skill has concluded so BattleManager.actor() is no longer storing anything.

You could use a plugin like Yanfly's Skill Core to set the variable ahead of time, when the skill is beginning - that would be the easiest thing. You could give the skill the notetag
Code:
<Before Eval>
$gameVariables.setValue(6, user.actorId());
</Before Eval>

Then your common event checks the value in variable 6 just like you're already doing.
It worked! Thank you so much!!

Original thread: https://forums.rpgmakerweb.com/threads/solved-check-if-actor-is-using-a-specific-skill-conditional-dialogue.169779/