Via conditional branch.
Just want to check if all live members are affected by a certain state
Just want to check if all live members are affected by a certain state
var allState = true;
var party = $gameParty.aliveMembers();
for (i = 0; i < party.length; i++) {
//x = state ID
if (!party[i].isStateAffected(x)) {
allState = false;
}
}
// y = switch ID... such as 18
$gameSwitches.setValue(y, allState)

$gameParty.aliveMembers.every(function(m) { return m.isStateAffected(5); });
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-check-if-all-alive-party-members-have-a-state.113654/