Call Script Version of 'is Skill Learned'?

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 86
For Good RPG Games!
I've been searching for a few days (perhaps it's my phrasing), but I'm just trying to write the call script version that will check if the actor has learned a skill.

This is basically all I'm trying to find:

if $game_actors[n].ThisSkillWasLearned == true
  do stuff
end

So it works just like the event conditional branch version. Thanks in advance!

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
I'm not sure which maker you are using, but every event command can be found in the Game_Interpreter class (or Interpreter class in RMXP). I don't have any version of RM installed on my present computer, but it is probably something like this in RMVX:

Code: [Select]
$game_actors[x].skills.include?(y)

Where x is the ID of the actor, and y is the ID of the skill.

But you should look at the interpreter class in whichever version of RM you are using. That will probably have the best way to do it.