Help using making skill [YEP skill core]

Hi !

I want to utilize <Custom Requirement> of skill core.

I would like to make it available when the HP of the Actor participating in the battle is low, but how can I do it?

ex)
There are 7 Party Actors, from A to G.
Currently, only A through D participate in the battle.
D's skill can only be used when the HP of A, B, C, D participating in the battle is less than 10%.
Likewise, if the party member is replaced by A, B, E, D in the middle of the battle, I would like to be able to use it only when the HP of A, B, E, D is less than 10% as before.
Plugin link, for reference:

Try this~
Code:
<Custom Requirement>
// if at least one "battle member" is...
if ($gameParty.battleMembers().some(function(m) {
  return m.hpRate() < 0.1;  // ...under 10% HP
})) {
  value = true;   // then skill is usable!
} else {
  value = false;  // otherwise, nope
}
</Custom Requirement>
Plugin link, for reference:

Try this~
Code:
<Custom Requirement>[/INDENT]
[INDENT]// if at least one "battle member" is...[/INDENT]
[INDENT]if ($gameParty.battleMembers().some(function(m) {[/INDENT]
[INDENT]  return m.hpRate() < 0.1;  // ...under 10% HP[/INDENT]
[INDENT]})) {[/INDENT]
[INDENT]  value = true;   // then skill is usable![/INDENT]
[INDENT]} else {[/INDENT]
[INDENT]  value = false;  // otherwise, nope[/INDENT]
[INDENT]}[/INDENT]
[INDENT]</Custom Requirement>

Oh.

I'm using this now.

<Custom Requirement>
for(var i = 0; i < 4; i++){
if ($gameParty.members().hp / $gameParty.members().mhp >= 0.05) {
value = false;
break;
} else {
value = true;
}}
</Custom Requirement>

This is the script I am using now, can I keep using it as is?

Or is there any difference compared to the script you passed?
Code:
<Custom Requirement>
for(var i = 0; i < 4; i++){
if ($gameParty.members()[i].hp / $gameParty.members()[i].mhp >= 0.05) {
value = false;
break;
} else {
value = true;
}}
</Custom Requirement>

This is the script I am using now, can I keep using it as is?

Or is there any difference compared to the script you passed?
Your script makes the skill usable iff someone has less than 5% HP, rather than 10%. (I guess you just decided to change the number.) Otherwise I think the effects are identical! 🙏

Original thread: https://forums.rpgmakerweb.com/threads/help-using-making-skill-yep-skill-core.122232/