Categories

If an actor is afflicted with a state, is there a way to make it so they lose x, y and z skills, and instead get a, b and c, but can’t have a, b and c added unless x, y and z were removed, with x coressponding to a, y to b, ect.

You are here:
  • KB Home
  • Rpg Maker MV
  • Yanfly
  • Tips & Tricks fan's made
  • If an actor is afflicted with a state, is there a way to make it so they lose x, y and z skills, and instead get a, b and c, but can't have a, b and c added unless x, y and z were removed, with x coressponding to a, y to b, ect.
< Back

Credit: Trihan

<custom apply effect>
skillPairs = [[8, 12]];
skillPairs.forEach(function(pair) {
  if (target.hasSkill(pair[0])) {
    target.learnSkill(pair[1]);
    target.forgetSkill(pair[0]);
  }
});
</custom apply effect>
[13:32]
Each element of skillPairs is an array consisting of [skill actor needs, skill to replace it with].

Each element of skillPairs is an array consisting of [skill actor needs, skill to replace it with], example: [[8, 12], [5, 13], [7, 9]] etc

Tags:
Table of Contents