Equipment check for some actors

Morizel

Veteran
Veteran
Joined
Sep 28, 2018
Messages
96
Reaction score
6
First Language
Russian
Primarily Uses
RMMV
In game I have 5 actors. And i want to check in conditional branch if actors 1, 2, 3 and 4 wears armor 11 in some location. How I must made it?
If that armor is not in inventory, then event adds this armor (number of armors varies from how many of these actors in the party) to inventory. Then puts in on them.
When player leaves that location, then that armor is removes from those characters.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
My English aint the best and iam not sure if i understand your Question correctly.
Event Command Conditional Branch:
Code:
◆If:Party has Ring (Include Equipment)
  ◆
:Else
  ◆
:End
Code:
◆If:Party has Ring
  ◆
:Else
  ◆
:End
 

Morizel

Veteran
Veteran
Joined
Sep 28, 2018
Messages
96
Reaction score
6
First Language
Russian
Primarily Uses
RMMV
My English aint the best and iam not sure if i understand your Question correctly.
Event Command Conditional Branch:
Code:
◆If:Party has Ring (Include Equipment)
  ◆
:Else
  ◆
:End
Code:
◆If:Party has Ring
  ◆
:Else
  ◆
:End
Here is more delicate.
I want to do something like this:
IF: Actors 1,2,3 and 4 has equipped Ring
Do nothing
: Else
Check how many actors in the party
If Actor 1 in the Party, then add 1 Ring and equip Ring on it;
If Actor 2 in the Party, then add 1 Ring and equip Ring on it;
If Actor 3 in the Party, then add 1 Ring and equip Ring on it;
If Actor 4 in the Party, then add 1 Ring and equip Ring on it;
If Actor 5 in the Party, then do nothing to it.
: End
 
  • Like
Reactions: Bex

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
So if they wear their own ring, they keep it and nothing is done.
But if they dont wear a ring, they get one. except actor5 he doesnt get one?

I will take a look.

Edit: Your explanation helped. I hope this goes towards the direction you ment?
I included 1 Switch for every Actor, it gets turned on when he leases a Ring, thatway its easier for you to remove them later on.
Code:
◆If:Harold is in the party
  ◆If:Harold has equipped Ring
    ◆
  :Else
    ◆Control Switches:#0011 Harold leased a Ring = ON
    ◆Change Armors:Ring + 1
    ◆Change Equipment:Harold, Accessory = Ring
    ◆
  :End
  ◆
:End
◆If:Therese is in the party
  ◆If:Therese has equipped Ring
    ◆
  :Else
    ◆Control Switches:#0012 Therese leased a Ring = ON
    ◆Change Armors:Ring + 1
    ◆Change Equipment:Therese, Accessory = Ring
    ◆
  :End
  ◆
:End
◆If:Marsha is in the party
  ◆If:Marsha has equipped Ring
    ◆
  :Else
    ◆Control Switches:#0013 Marsha leased a Ring = ON
    ◆Change Armors:Ring + 1
    ◆Change Equipment:Marsha, Accessory = Ring
    ◆
  :End
  ◆
:End
◆If:Lucius is in the party
  ◆If:Lucius has equipped Ring
    ◆
  :Else
    ◆Control Switches:#0014 Lucius leased a Ring = ON
    ◆Change Armors:Ring + 1
    ◆Change Equipment:Lucius, Accessory = Ring
    ◆
  :End
  ◆
:End
 
Last edited:

Morizel

Veteran
Veteran
Joined
Sep 28, 2018
Messages
96
Reaction score
6
First Language
Russian
Primarily Uses
RMMV
So if they wear their own ring, they keep it and nothing is done.
But if they dont wear a ring, they get one. except actor5 he doesnt get one?
Yes.
Thanks for help. Although i didn't use the switches in my case.
Now I have only one question: How i can check equipment on any of actors in party?
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Quote: "How i can check equipment on any of actors in party?"

Could you formulate that differently or more detailed? I dont understand.
I thought that is what we did in the example above in the Spoiler.
 

Morizel

Veteran
Veteran
Joined
Sep 28, 2018
Messages
96
Reaction score
6
First Language
Russian
Primarily Uses
RMMV
Quote: "How i can check equipment on any of actors in party?"

Could you formulate that differently or more detailed? I dont understand.
I thought that is what we did in the example above in the Spoiler.
No, it's differently. Kind of.
As I know, there is a script which checks state is applied on all active party members (at example "if heroes are cocooned up or fascinated"):
Code:
$gameParty.AliveMembers().every(function(member){return member.isStateAffected(State Index)})
And I thought that maybe there is the same scripts, but instead of state it checks equipment?
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,492
Reaction score
408
First Language
German
Primarily Uses
RMMV
Ah so we are talking about Battle Scene.
Yes there should be commmands for that like in your example, but for that iam the wrong one,
i dont know them and rely on this Website myself =)
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,115
Reaction score
1,525
First Language
EN
Primarily Uses
RMMZ
:kaohi: Not sure if it's quite what you want, but this works for me in a Script command (without plugins):
Code:
var item   = $dataArmors[4];   // item to check/equip
var slotId = 4;                // equip slot (0 = first slot)
$gameParty.aliveMembers().forEach(function(actor) {
  if (!actor.isEquipped(item)) {
    $gameParty.gainItem(item, 1);
    actor.changeEquip(slotId, item);
    $gameMessage.add(actor.name() + ' equipped ' + item.name() + '!');  // test
  }
});
In plain English, it says:
  • Let item be armor 4 in the database
  • That item goes in slot ID 4 (fifth equip slot)
  • For each living actor in the party...
    • If the actor does not have item equipped...
      • Add 1 item to the party
      • Make the actor equip that item to the specified equip slot
      • Show a message like "[actor] equipped [item]!" (optional, delete this line if you like)
 

Morizel

Veteran
Veteran
Joined
Sep 28, 2018
Messages
96
Reaction score
6
First Language
Russian
Primarily Uses
RMMV
Okay, thank you!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,034
Messages
1,018,446
Members
137,820
Latest member
georg09byron
Top