Conditional Branch Weirdness

Hello again, here with a question about Conditional Branches. So I've made a boulder pushing puzzle and I have events setup to protect the player from getting trapped if they soft lock the puzzle. Issue I'm having is if I try to define more then 2 of the soft locks, it doesn't check for any beyond the first two. I've posted two screenshots, the one with only 2 checks works completely fine without any issues at all. However the moment I try to add others, like the screenshot with 3 checks, the 3rd one onward is getting ignored completely. This puzzle has if I counted right 6 ways to softlock, and I'm not sure why it refuses to do any of the other checks. I've made sure the coordinates I'm specifying are correct and I've checked the switches with a plugin to see if they're not triggering or if they were and it was something else.

When I do check the switches they are indeed not triggering properly for the 3rd check onward. I have tried to specify more then 1 boulder in the check too and it still ignores beyond the first two. This also happens if I make the 3rd one in it's own event page AND if it's in it's own event entirely. So my question I guess is, does anyone happen to know why it's not doing it for any beyond the first two, and if by chance there's some weird limit on Conditional Branches when checking coordinates for events?
The first thing I would do is eliminate the conditions in nested branches which have to have been true in order to get there in the first place. Like "fixed puzzle is off". Because that's your very first condition, there is no way for it not to be off in any branch inside it, because if it's on it won't get that far to begin with.
The first thing I would do is eliminate the conditions in nested branches which have to have been true in order to get there in the first place. Like "fixed puzzle is off". Because that's your very first condition, there is no way for it not to be off in any branch inside it, because if it's on it won't get that far to begin with.
I could have the event turned on through a transfer or similar if I really wanted. I did have no starting condition when I first started doing this whole thing and it actually didn't work at all, which is why I added it. I know it's a bit messy looking to look at but yeah it didn't work unless I specified that at the start, and this was what fixed that issue. I'm also not showing what all goes on with this event since it's just a few transfers to reset the thing and not creating the issue. But that doesn't explain the current one. @w@
If the first X coordinate is True but the Y coordinate is false, than no else case is triggered
and therfor the other conditions never get checked.

If Fixed Puzzle is OFF
-If X
-If Y
- if both yes Do stuff
-no else cases
-end
-next if x
-next if y
-next if both yes do stuff
-next no else cases
-next end
-another if x
...
end
no else case unless its needed.
I could have the event turned on through a transfer or similar if I really wanted. I did have no starting condition when I first started doing this whole thing and it actually didn't work at all, which is why I added it. I know it's a bit messy looking to look at but yeah it didn't work unless I specified that at the start, and this was what fixed that issue. I'm also not showing what all goes on with this event since it's just a few transfers to reset the thing and not creating the issue. But that doesn't explain the current one. @w@
You're misunderstanding what I'm saying.

You're checking for the switch being off in every conditional branch, but you only need to do so in the first one: in the event that the switch is on, it will never make it past that first check in the first place so there's no point in checking it in any internal branch, it will never not be true.
I know it's a bit messy looking to look at but yeah it didn't work unless I specified that at the start

You're misunderstanding what I'm saying.

You're checking for the switch being off in every conditional branch, but you only need to do so in the first one
Trihan isn't saying to take it away at the start. What he's pointing out is this:
Not Working Code.png
Those red boxes are inside of the green box and they're asking the same thing. That's meaningless because it's impossible for you to get to those lines unless you already made sure Fixed Puzzle was OFF.

Stuff like that is not just poor practice in terms of event logic, it also makes it harder to keep track of which condition you're responding to with an Else.
Trihan isn't saying to take it away at the start. What he's pointing out is this:
View attachment 235992
Those red boxes are inside of the green box and they're asking the same thing. That's meaningless because it's impossible for you to get to those lines unless you already made sure Fixed Puzzle was OFF.

Stuff like that is not just poor practice in terms of event logic, it also makes it harder to keep track of which condition you're responding to with an Else.
Oh no I understood, I'm calling that the "start" as it's the literal start of the whole softlock check. I took it out and left the rest in and it again doesn't fix it, if I only have it for one or take it away completely. I had those there because at first when I just had it checking coords it wouldn't work for any of them. The switch itself IS forced off through other events so as to make sure that bit works. I guess I wasn't clear enough, I have it do that via a transfer. So like, right now if one of those coord configurations happens, that switch "Softlock Puzzle" turns on...it then triggers the 2nd page of this event, which will send the player to another map, on that map you are then sent back to the one where the puzzle itself is and the switch is forced off during that.

Like I mention in the first post it can check the first 2 without any issues at all. I can also repeatedly do those two over and over without issues. However the remaining 4 possible softlocks are not being checked at all, regardless of it checking for "Fixed Puzzle" being off, or if I tell it to not check for that switch. If I remove Else's and just make each their own thing, make them their own events etc it also doesn't check them. The idea is I need it to check for any of 6 specific locations for my boulders which is why I was doing a "daisy chain" of If/Else since if one isn't met but another is it needs to trigger the softlock safety. If none of them trigger it can just move on as if nothing happened.
Oh no I understood, I'm calling that the "start" as it's the literal start of the whole softlock check. I took it out and left the rest in and it again doesn't fix it, if I only have it for one or take it away completely. I had those there because at first when I just had it checking coords it wouldn't work for any of them. The switch itself IS forced off through other events so as to make sure that bit works. I guess I wasn't clear enough, I have it do that via a transfer. So like, right now if one of those coord configurations happens, that switch "Softlock Puzzle" turns on...it then triggers the 2nd page of this event, which will send the player to another map, on that map you are then sent back to the one where the puzzle itself is and the switch is forced off during that.

Like I mention in the first post it can check the first 2 without any issues at all. I can also repeatedly do those two over and over without issues. However the remaining 4 possible softlocks are not being checked at all, regardless of it checking for "Fixed Puzzle" being off, or if I tell it to not check for that switch. If I remove Else's and just make each their own thing, make them their own events etc it also doesn't check them. The idea is I need it to check for any of 6 specific locations for my boulders which is why I was doing a "daisy chain" of If/Else since if one isn't met but another is it needs to trigger the softlock safety. If none of them trigger it can just move on as if nothing happened.
I wasn't saying that would fix it, I was saying that removing the stuff that doesn't need to be there makes it easier to read and that makes it easier to troubleshoot what *will* fix it.
I wasn't saying that would fix it, I was saying that removing the stuff that doesn't need to be there makes it easier to read and that makes it easier to troubleshoot what *will* fix it.
I understand, sorry..it wasn't working at all without it was only reason I was doing it. But yeah it for sure makes things easier to read. If/Else is pretty easy to make "messy" I've learned over the years. ^^;
If the first X coordinate is True but the Y coordinate is false, than no else case is triggered
and therfor the other conditions never get checked.

If Fixed Puzzle is OFF
-If X
-If Y
- if both yes Do stuff
-no else cases
-end
-next if x
-next if y
-next if both yes do stuff
-next no else cases
-next end
-another if x
...
end
no else case unless its needed.

To clarify you're saying to do this right? And for the extra checks to just not specify the "Fixed Puzzle Switch, and then no else statements at all/only at the very end? That won't work right if I'm understanding while you're checking for 6 different positioning setup, I would still have an else right at the end since it needs to do nothing at all if none of the 6 softlocks happen. Unless there's an easier way for me to use a script or such to tell it to look for x or y or z etc, I was using Else's since that's the only way I am aware of in RM to do a check like that and get it to properly work. RM doesn't really do Else/If statements just If/Else but in my case I actually need Else/If for it to properly do this, WITH an If/Else. The problem for me though is I haven't done Java or Javascript by hand in over a decade and so I'm not sure how I would write it from scratch, I can still read code fine just writing has now poofed from my skillset. xD
1659206716939.png

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-weirdness.149880/