Check if user has learned a skill - SOLVED

My actors learn skills by using an item (spell scroll). I now want to check whether the actor using the item has already learned that skill.

The user of the item I have set to a variable with a script ( $gameParty._targetActorId ) but I don't know anything about scripts, really. So I don't know if that variable is nessicary to do this at all.

Is there a way to check whether that variable has learned a particular skill, or another way to do this? (Sorry if this is super vague)
This should be useful: https://forums.rpgmakerweb.com/inde...ctor-has-a-certain-skill-via-scripting.42927/
That's for VXACE not MV @SwiftSign


This is the script call you want:

$gameActors.actor($gameVariable.value (w)).skills().contains($dataSkills[g]);

where w is the id of the variable and g is id of the skill. Also make sure everytime the skill is used the variable is set.

Or if yoy don't want to mess with a variabke, just use this:
$gameActors.actor($gameParty._targetActorId).skills().contains($dataSkills[g]);

where g is the id of the skill id.
That's for VXACE not MV @SwiftSign


This is the script call you want:

$gameActors.actor($gameVariable.value (w)).skills().contains($dataSkills[g]);

where w is the id of the variable and g is id of the skill. Also make sure everytime the skill is used the variable is set.

Or if yoy don't want to mess with a variabke, just use this:
$gameActors.actor($gameParty._targetActorId).skills().contains($dataSkills[g]);

where g is the id of the skill id.

The second script call works perfectly, way simpler that way without the hassle of a variable. Thank you so much!
$gameActors.actor($gameParty._targetActorId).skills().contains($dataSkills[g]);
For this could I also add other skills into the same check such as, $dataSkills[13,27,30] ?

@Midnight Kitty , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Please make your own thread if you have a question instead.

Closing.

Original thread: https://forums.rpgmakerweb.com/threads/check-if-user-has-learned-a-skill-solved.82847/