Hello I need help im trying to figure implement a system similar to xenoblade 2's field skill system and i've encountered to problems using the conditional branch system
1. the checks have to be specific to a character when i want them to be able to be fulfilled by any character
2. checks are being fulfilled even though the only actor who has it base isn't in the party
I don't have any experience with java so i don't know if this can be fixed by writing my own script
check if party has a certain skill
● ARCHIVED · READ-ONLY
-
-
$gameParty.battleMembers().some(function(actor) { return actor.hasSkill(x); })
where x is the id of the skill, with no leading zeros.
battleMembers() will restrict it to only the first 4
some() will look at everyone and return true if just one meets the requirements
If you only want to look at your living battlers, use this instead:
$gameParty.battleMembers().some(function(actor) { return actor.isAlive() && actor.hasSkill(x); })
And it's Javascript, not Java. They are two very different languages :) -
$gameParty.battleMembers().some(function(actor) { return actor.hasSkill(x); })
where x is the id of the skill, with no leading zeros.
battleMembers() will restrict it to only the first 4
some() will look at everyone and return true if just one meets the requirements
If you only want to look at your living battlers, use this instead:
$gameParty.battleMembers().some(function(actor) { return actor.isAlive() && actor.hasSkill(x); })
And it's Javascript, not Java. They are two very different languages :)
Thank you for replying so fast! it doesn't appear to be working im not sure i've put it in right
◆If:Script:$gameParty.battleMembers().some(function(actor) { actor.hasSkill(65) })
◆Play SE:Saint5 (90, 100, 0)
◆Text:Conall(0), Window, Bottom
: :Leave it to me!
◆Fadeout Screen
◆Play SE:Switch1 (90, 100, 0)
◆Wait:60 frames
◆Play SE:Switch1 (90, 100, 0)
◆Wait:60 frames
◆Play SE:Switch2 (90, 100, 0)
◆Wait:30 frames
◆Play SE:Switch3 (90, 100, 0)
◆Play SE:Chest1 (90, 100, 0)
◆Control Variables:#0021 Lockpicking times += 1
◆Control Self Switch:A = ON
◆Fadein Screen
◆
:Else
◆Play SE:Cancel2 (90, 100, 0)
◆Text:None, Dim, Bottom
: :Lockpicking Traverse Skill Lv1 required
◆
:End
An actor has the skill so I don't know where to go from here.
thank you again for your help! -
ah, you got my post before I added a correction (but you quoted the corrected version :D ). Please look at it again and change your condition to what's there now.
-
It works! thanks a ton!ah, you got my post before I added a correction (but you quoted the corrected version :D ). Please look at it again and change your condition to what's there now.