- Joined
- Jul 24, 2015
- Messages
- 83
- Reaction score
- 27
- First Language
- English
- Primarily Uses
I am trying to create a system where the user learns new skills by using older skills to a higher level using yanfly skill mastery levels plugin.
www.yanfly.moe
www.yanfly.moe
in the above code, the skill checks if it is at a sufficient skill mastery level then learn the upgraded skill, the problem is, the new skill isn't learned until it is used one more time after the old skill is leveled up.
I want to learn the new skill as soon as the user levels up the old skill. How do I go about doing that, am I using the correct eval, or is it something completely different?
Skill Mastery Levels (YEP) - Yanfly.moe Wiki
Skill Core (YEP) - Yanfly.moe Wiki
Code:
<Before Eval>
if (!user.isLearnedSkill(609)){
if (user.skillMasteryLevel(item.id) >= 2) {
user.learnSkill(609);
var text = user.name() + ' has learned '
text = text + 'Fira!';
$gameMessage.add(text);
}
}
</Before Eval>
in the above code, the skill checks if it is at a sufficient skill mastery level then learn the upgraded skill, the problem is, the new skill isn't learned until it is used one more time after the old skill is leveled up.
I want to learn the new skill as soon as the user levels up the old skill. How do I go about doing that, am I using the correct eval, or is it something completely different?