Eventing problem - shop only for two classes

Hey, I have a small problem that I don't know how to make the shop only for two classes, namely for mage and priest, when I made this event, only mage goes to the shop but not priest. Could someone please advise me how to make this event correctly so that both two classes can go inside? Thank you.
1700658435994.png
You nested the conditional branches - you put one inside the other.

So following the logic of what you wrote:
Is Reid a Mage?
if Yes, is Reid a Priest?
if Yes, do the shop.

So it can only happen if Reid is both a Mage and a Priest, which is impossible.

Separate out the two conditional branches and paste the shop stuff inside of each one.
Your test for the priest class does nothing as it is empty, and being nested in what happens if the test for the mage class is true, it cannot be true.

I suggest using a switch. It starts OFF (make sure it is OFF by setting it to OFF), then you test the mage class, if it succeeds you turn the switch ON.
Independantly you test the priest class, and if it is true you also turn the switch ON.
As a third step you open your shop if the switch is ON.
With a switch you can avoid duplicating code (and duplicating bugs, duplicating work if you want to change the events etc...).
With a switch you can avoid duplicating code (and duplicating bugs, duplicating work if you want to change the events etc...).
That's valid, different styles. I would argue if you have to change anything in the event it then takes one click to select everything inside of the conditional and you can just copy and re-paste that, and don't have to spend one of your global switches on it.

But you get plenty of switches, and it would make the overall event shorter your way.

Your test for the priest class does nothing as it is empty
You're right, I didn't even notice that. Yes, there are a number of errors in the existing logic.
don't have to spend one of your global switches on it

I agree. I'm sure a door event will have a free self switch for this purpose 🙂
I agree. I'm sure a door event will have a free self switch for this purpose 🙂
...or this event? 🤣
thre should be an scriptcall for class check, so you could do:
if actor 1 (reid) == mage || actor 1 == priest, so that the shop can work
if either is true for actor 1 reid.
Your test for the priest class does nothing as it is empty, and being nested in what happens if the test for the mage class is true, it cannot be true.

I suggest using a switch. It starts OFF, then you test the mage class, if it succeeds you turn the switch ON.
Independantly you test the priest class, and if it is true you also turn the switch ON.
As a third step you open your shop if the switch is ON.
With a switch you can avoid duplicating code (and duplicating bugs, duplicating work if you want to change the events etc...).
By using labels, you can avoid the need for a switch:
1700661192995.png
Nice one, @Arthran! So many ways to achieve a goal 🙂
very clean as well, + much more readable to do what you want.
didn't think of labeling that way.
Thank you to everyone who tried to help me ☺️

Original thread: https://forums.rpgmakerweb.com/threads/eventing-problem-shop-only-for-two-classes.163165/