Hi guys,
I'm trying to set up a skill tree system where you start with a base skill, with several chances to upgrade as the game progresses. Each time you upgrade, you get two choices on how to upgrade it but choosing one will block off the other path.
E.g.
Skill 20 = base
Skill 21 = 1st upgrade available choice(a)
Skill 22 = 1st upgrade available choice(b)
...
Learning skill 20 will cause that to disappear from the list, making skills 21 and 22 appear as choices (already got that bit down pat). But when I go to choose either 21 or 22, the other doesn't disappear.
I'm using Yanfly's Skill Learn plug in and have read similar posts, but I can't figure it out. Here's the code I've been using:
<Learn Show Eval>
if(!this._actor.isLearnedSkill(20) || this._actor.isLearnedSkill(21) || this._actor.isLearnedSkill(22) { value = false; }
else value = true;
</Learn Show Eval>
And here's the error that pops up.
EDIT: Whoops, forgot to ask - I think it could be fixed by including a check in Skill 21 to see if the actor has not learned skill 22 (and visa versa) but I don't know how to get the program to run that check.
Many thanks for your help!
I'm trying to set up a skill tree system where you start with a base skill, with several chances to upgrade as the game progresses. Each time you upgrade, you get two choices on how to upgrade it but choosing one will block off the other path.
E.g.
Skill 20 = base
Skill 21 = 1st upgrade available choice(a)
Skill 22 = 1st upgrade available choice(b)
...
Learning skill 20 will cause that to disappear from the list, making skills 21 and 22 appear as choices (already got that bit down pat). But when I go to choose either 21 or 22, the other doesn't disappear.
I'm using Yanfly's Skill Learn plug in and have read similar posts, but I can't figure it out. Here's the code I've been using:
<Learn Show Eval>
if(!this._actor.isLearnedSkill(20) || this._actor.isLearnedSkill(21) || this._actor.isLearnedSkill(22) { value = false; }
else value = true;
</Learn Show Eval>
And here's the error that pops up.
EDIT: Whoops, forgot to ask - I think it could be fixed by including a check in Skill 21 to see if the actor has not learned skill 22 (and visa versa) but I don't know how to get the program to run that check.
Many thanks for your help!