Hime's Learn Condition Formula Help

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
574
Reaction score
196
First Language
English
Primarily Uses
RMMV
Hey! :kaohi:

In my project, I'm using Hime's Learn Condition Formulas script, which allows you to set formulas that determine if an actor can access a skill.

Could someone help me create a condition that will only allow access to a skill if the actor already knows skill 170?

Thank you! :kaopride:
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
If you want to check whether the actor learned skill X already, you can use this:
Code:
a.skill_learn?($data_skills[skill_id])
If you want to check whether the actor has skill X from any source (learned, equipment, states, etc), you can use this instead:
Code:
a.skills.include?($data_skills[skill_id])
In both cases, just replace the skill_id part with the database ID of the skill you want to check for.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
574
Reaction score
196
First Language
English
Primarily Uses
RMMV
Hey, thanks for the quick reply!

Your formula seems to work great, although I ran into a bit of a snare. Not so much due to the formula, just due to my understanding of the script.

Is there an "exclude?" script command that I could use in that formula instead? Basically checking if I don't have a skill.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Just put a ! sign at the beginning of them and it will negate the condition.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
574
Reaction score
196
First Language
English
Primarily Uses
RMMV
Works like a charm! Thanks a ton! :kaopride:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top