I have this Skill that any Party Member can use as long as they have equipped a certain piece of Armor. The Skill comes with a long Cooldown due to how powerful it is, problem is that the Cooldown will only effect the Actor who USED it and if you swap who has the Armor Equipped then that Actor is INSTANTLY able to use that same Skill without having to wait for the Cooldown.
I had this previous script that helped with this problem but im finding out now that if any Actor goes down in Battle and then is swapped out to the inactive Actors, an error will occur upon the Battle ending in any form if the Skill had been used in said Battle.
So, is there like a way I could make it so the Skill has a Cooldown that links across all Actors who can use it and regardless of who used it, the Cooldown will be the same for everyone or something?
Here's the scriptcall btw, also I will mention I changed the "battleMembers" to "allMembers" and the result was still the same
I had this previous script that helped with this problem but im finding out now that if any Actor goes down in Battle and then is swapped out to the inactive Actors, an error will occur upon the Battle ending in any form if the Skill had been used in said Battle.
So, is there like a way I could make it so the Skill has a Cooldown that links across all Actors who can use it and regardless of who used it, the Cooldown will be the same for everyone or something?
Here's the scriptcall btw, also I will mention I changed the "battleMembers" to "allMembers" and the result was still the same
JavaScript:
const armorActor = $gameParty.battleMembers().find(member => member.hasArmor($dataArmors[504]));
if (armorActor) {
$gameParty.allMembers().forEach(member => {
if (member._cooldownTurns === undefined) {member.clearCooldowns()};
member._cooldownTurns[406] = armorActor._cooldownTurns[406];
})
}