The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Theodie12345 on August 15, 2015, 01:06:18 PM

Title: Call Script Version of 'is Skill Learned'?
Post by: Theodie12345 on August 15, 2015, 01:06:18 PM
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!
Title: Re: Call Script Version of 'is Skill Learned'?
Post by: modern algebra on August 17, 2015, 01:16:11 PM
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.