Having an event problem.

I'm working on an story bit that changes the main characters Armour, weapon, and shield and they can't leave the room until they have all three. However, whenever I get two of the three, the last one somehow gets erased.

Here's the event page I've been having trouble with:  Event Problem.png (It applies to all three, but with different names)
Sounds like you're using multiple parallel processes, and the design just doesn't look like a good way to do things. Why are you using an event that checks if a switch is on, and turn another switch on? Why not just have whatever depends on the "other" switch look at the first switch instead?

Better yet - get rid of the lot of them. Have ONE event that checks all three, and turns on a single switch if they have everything equipped.

How are you determining whether they have stuff equipped - is there only one weapon, armor and shield available at this point in time? Something like this will work better, and as you only need to know at the point when they attempt to exit the room, put it on the door event, not in a parallel process.

First create a Door quick event. Add the following commands, then cut and move all the original commands from the door event to immediately above the Control Switches command. The Exit Event Processing stops the text from showing once the player has all the equipment. If they don't have everything they need, it drops through to the message.

Code:
Conditional Branch: Actor [001: Peter] is [Sword] Equipped  Conditional Branch: Actor [001: Peter] is [Armor] Equipped    Conditional Branch: Actor [001: Peter] is [Shield] Equipped      Control Switches [001: Equipment On] = ON      Exit Event Processing    Branch End  Branch EndBranch EndShow Text: You're really not prepared to face what's on the other side of that door yet.
It's not clear to me what it is you are trying to do with this event.  Would it not be easier to put everything into the transfer event like this?

A series of nested conditional branches

Is armour in inventory? (check the box which says 'include equipped?')

If yes, next conditional

Is weapon in inventory? (check the box again)

If yes, next conditional

Is shield in inventory (check the box again)

If yes - transfer the player out of the room.

If at any stage something is missing, the 'Else: branch should have whatever bit of dialogue you want.

Ninja'd by Supa-ninja-Shaz
Well, the equipment is different depending on the characters class, like this: Event problem part 2.png

And the event ends on this: Event problem part 3.png

Sorry about being vague. I'm new ^^'
You still need a better way to do it. What you've got is just difficult, confusing, and doesn't work.

All you want to do is see if they have armor, a weapon, and a shield equipped. Doesn't matter WHAT they have in those slots - as long as they have SOMETHING. That gets around your different-equipment-per-class problem.

So you could probably use a Script in your conditional branch to see if that equip slot is 'nil' - if it's nil, they don't have anything equipped.

Slot 0 is the weapon. Slot 1 is the shield (or second weapon for dual-handed actors). Slot 3 is the armor.

So my example above would then become:

Conditional Branch: Script: $game_actors[1].equips[0] != nil Conditional Branch: Script: $game_actors[1].equips[1] != nil Conditional Branch: Script: $game_actors[1].equips[3] != nil Control Switches [001: Equipment On] = ON Exit Event Processing Branch End Branch EndBranch EndShow Text: You're really not prepared to face what's on the other side of that door yet.The != nil is optional, but I added it as I thought it might make it clearer.
Conditional Branch: Script: $game_actors[1].equips[0] != nil Conditional Branch: Script: $game_actors[1].equips[1] != nil Conditional Branch: Script: $game_actors[1].equips[3] != nil Control Switches [001: Equipment On] = ON Exit Event Processing Branch End Branch EndBranch EndShow Text: You're really not prepared to face what's on the other side of that door yet.
Newbie question, but where would I put that? In the equip change events or the leaving room event?
In the leaving the room events. Get rid of ALL the equip changing events. You don't need them. You only need to check what equipment the player has when they attempt to leave the room, so you put it on the event that causes them to leave the room.


And read my other post - I also said to put this into a door event, and to put the default door processing immediately above the Control Switches command. You still need to do that.


Before you do it though, copy the default page of the door event and paste it to a second page on the same event. Condition it with the switch you're turning on above. Then add that conditional branch stuff to the first page. This means it will only check the equipment until the player is able to leave the room the first time. After they get out initially, it won't keep checking whenever they come back and try to leave again.
Thanks! You've been a big help 🙂

Original thread: https://forums.rpgmakerweb.com/threads/having-an-event-problem.42506/