Yanfly's Skill Learn System

adder

Villager
Member
Joined
Apr 1, 2016
Messages
5
Reaction score
1
First Language
spain
Primarily Uses
Hello, Im new to this forum, so Im not sure if this is the right section, but here it is...


Im using Yanfly's Skill Learn System but since I have a huge amount of skills to learn, Id like to be able to 'hide' already learnt skills, instead of them staying on the list labeled as learnt.


I was using the following code:


  <Learn Show Eval>
  if(!this._actor.isLearnedSkill(ID)) { value = true; }
  else value = false;
  </Learn Show Eval>


Replacing ID with the skill ID, so it disappears when learning. So far so good, but the real problem appears then. Every skill becomes available once the character meets a certain level, so what I wanted to do is set a level requirement for every skill to appear on the list and become available for the character to learn and, once learnt, disappear from that list.


My knowledge about JavaScript is a bit limited, but I've already tried this to no avail:


  <Learn Show Eval>
  if(!this._actor.isLearnedSkill(ID)) { value = true; }
  else value = false;
  value = user.level > 5;
  </Learn Show Eval>


I've also tried other variations but cant I get it to work.


I hope you can help me. Thank you in advance, and sorry for my bad English!


TLDR: I'd like to set a level requirement for a certain skill so it appears on the list and becomes available only when that requirement is met and disappear when the character learns it, instead of being labeled as 'Learnt'
 
Last edited by a moderator:

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
Did you try combining the 2 into one if statement?


<Learn Show Eval>
  if(!this._actor.isLearnedSkill(ID) && this._actor.level > 5 ) { value = true; }
  else value = false;
  </Learn Show Eval>


Also, I think you wrote the second part wrong.


If this._actor was correct for the first part, I'm guessing it would be for the second.
 

adder

Villager
Member
Joined
Apr 1, 2016
Messages
5
Reaction score
1
First Language
spain
Primarily Uses
Did you try combining the 2 into one if statement?


<Learn Show Eval>
  if(!this._actor.isLearnedSkill(ID) && this._actor.level > 5 ) { value = true; }
  else value = false;
  </Learn Show Eval>


Also, I think you wrote the second part wrong.


If this._actor was correct for the first part, I'm guessing it would be for the second.


Hi


Thank you so much, works perfect, the problem that led me to combine in the same statement would surely be to put "this._user" instead of "this._actor"



Thank you very much for the help
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
Hi


Thank you so much, works perfect, the problem that led me to combine in the same statement would surely be to put "this._user" instead of "this._actor"



Thank you very much for the help
You're welcome!
 

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

Latest Threads

Latest Posts

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,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top