I'm working on a prototype with the idea of having players select what a door will lead to. It's currently set up like this:
There is a switch with four options that determines what the doorway will point to:
There is a "player touch" event that then interprets this and teleports using a set of common events for each room:
The orient = leftOr is interpreted by the common events to put the player in a sensible location for the new room that they enter:
Unfortunately I'm running into a problem where instead of going down the list, finding the If statement that matches, and then executing the statement will run through each option in sequence whether or not it's been met. I swear that I've successfully used this sort of set-up in MZ before, but I can't figure out how to get it to run correctly without blasting through ever option in the list.
I'm probably missing something simple, but does anyone have any ideas?
As a note, this same set-up DOES work if I do nested If-Else statements, but I really, really want to avoid doing that for the sake of extensibility and readability.
There is a switch with four options that determines what the doorway will point to:
There is a "player touch" event that then interprets this and teleports using a set of common events for each room:
The orient = leftOr is interpreted by the common events to put the player in a sensible location for the new room that they enter:
Unfortunately I'm running into a problem where instead of going down the list, finding the If statement that matches, and then executing the statement will run through each option in sequence whether or not it's been met. I swear that I've successfully used this sort of set-up in MZ before, but I can't figure out how to get it to run correctly without blasting through ever option in the list.
I'm probably missing something simple, but does anyone have any ideas?
As a note, this same set-up DOES work if I do nested If-Else statements, but I really, really want to avoid doing that for the sake of extensibility and readability.