Equipment check for anybody in the party

How to check equipment nor on specific actor, neither on all actors in party, but on any (no need to check specific actor's ID) actor in the party?
I want to make event includes with next conditional banch: "IF at least one character in party wears Chaimail (armorID 5), then happens A, else B".
As example, the door opens only when somebody in the player's party wears Jeweled Sword or Magic Armor.
You can give this a try
HTML:
◆Script:var item = $dataWeapons[2]; //$dataArmors[2]
:      :this._isEquipped = $gameParty.members().some(function(a){
:      :  return a.isEquipped(item);
:      :})
◆If:Script:this._isEquipped
  ◆Text:None, Window, Bottom
  :    :Okay!
  ◆
:Else
  ◆Text:None, Window, Bottom
  :    :...
  ◆
:End
Can I make a suggestion?

There's a great plugin my Mjshi called "Conditional Branch+". It adds a bunch of new script calls to simplify the process of doing these kind of checks. Checking all party members for equipment is one of them. I highly recommend it.

https://forums.rpgmakerweb.com/index.php?threads/conditional-branch.63723/
Couldn't you event that? Have a door say "If x equipped on Member A, open door, else, Member B, C, D, else Show Text: Locked"
I did that with event's before. Had a training area where you couldn't enter unless you had a Practice Weapon equipped.
Couldn't you event that? Have a door say "If x equipped on Member A, open door, else, Member B, C, D, else Show Text: Locked"
I did that with event's before. Had a training area where you couldn't enter unless you had a Practice Weapon equipped.
Well, I thought there was a script, like checking the entire party for the having of a particular state:
Code:
$gameParty.aliveMembers().every( function(member) {return member.isStateAffected (N) } )
Or like a script that checks to see if at least someone in the party is in a state:
Code:
$gameParty.allMembers().some( function (actor) {return actor.isStateAffected (State ID) } );
You can condense what @dsiver144 wrote into a single line for using in the same manner as you have been for states like so:

Code:
$gameParty.members().some(function(actor){return actor.isEquipped($dataArmors[5])})

Likewise, this will work with the every() method as well.
You can condense what @dsiver144 wrote into a single line for using in the same manner as you have been for states like so:

Code:
$gameParty.members().some(function(actor){return actor.isEquipped($dataArmors[5])})

Likewise, this will work with the every() method as well.
Okay, what's wrong am I doing?
I tried to make a lamp item using Terrax Lighting plugin.
capture_003_18122019_234003.jpg

The item was realized as armor item 17. But ingame it doesn't work. Although the switch is on.
I can't be sure what's going wrong - I can't see the whole of the condition, but assuming you've changed the "5" to "17" and everything else is an exact copy of what I posted previously the code should be working.

My first concern is that this is set up as a looping parallel event but doesn't seem to be doing anything that requires being executed 60 times a second. I'm not sure how this lighting plugin works but if it has an animation to turn on the light over time it's possibly getting interrupted by starting the process all over again every time the plugin command is called. I'd advise turning off switch 1 at the end of your event so it only executes once.

If that doesn't work can you confirm that the "Plugin Command: Tint set #111111" is working properly? If it is, add a show text before "Plugin Command: Fire radius 110 #FFFFFF" - add any text you want - and run a playtest. If the text appears then the condition is working and it's probably worth checking you have the lighting plugin set up properly. If it doesn't then please show me the whole script you're using.
I can't be sure what's going wrong - I can't see the whole of the condition, but assuming you've changed the "5" to "17" and everything else is an exact copy of what I posted previously the code should be working.

My first concern is that this is set up as a looping parallel event but doesn't seem to be doing anything that requires being executed 60 times a second. I'm not sure how this lighting plugin works but if it has an animation to turn on the light over time it's possibly getting interrupted by starting the process all over again every time the plugin command is called. I'd advise turning off switch 1 at the end of your event so it only executes once.

If that doesn't work can you confirm that the "Plugin Command: Tint set #111111" is working properly? If it is, add a show text before "Plugin Command: Fire radius 110 #FFFFFF" - add any text you want - and run a playtest. If the text appears then the condition is working and it's probably worth checking you have the lighting plugin set up properly. If it doesn't then please show me the whole script you're using.
I'm sorry, my bad. It's already working.
I was just confused that I can't turn light script off in the map.

Original thread: https://forums.rpgmakerweb.com/threads/equipment-check-for-anybody-in-the-party.115984/