I've had a look at it, and frankly, the script required to perform this action would be even MORE cumbersome than just using a 4x nested conditional in the event. You would need to reset a game variable, then run a forEach command to check if each actor has the skill, and for each one if they do change the game variable to true, and then at the end of your script call run a conditional branch to check if the variable is set to true.
The power of the event editor is that it does so much of the code behind the scenes for you. If there's a way to do it in the editor, it's usually faster than the associated script.
EDIT: Since you're interested in the script, though, it would look something like this...
Code:
$gameVariables.setValue(VARIABLEID, false);
$gameParty.members().forEach(function(actor) {
if (actor.hasSkill(SKILLID) {
$gameVariables.setValue(VARIABLEID, true);
};
});
where VARIABLEID and SKILLID are replaced by the appropriate numbers, and follow that up with your conditional branch to check if VARIABLEID is true.
EDIT2: (GAH, I hate it when you figure something out after you post)
If you're just pasting it into the conditional branch script area, you could do this, if it fits:
Code:
var temporaryVariable = false;
$gameParty.members().forEach(function(actor) {
if (actor.hasSkill(SKILLID) {
temporaryVariable = true;
};
});
return temporaryVariable;
Still pretty hard to follow your own logic after the fact, though. I'd do the nested conditional unless you have 18 party members or something.