Conditional Branch: Switch not Working

Hello Everyone,

I am having an Extremely hard time with the Conditional Branch: Switch. As you can see in the Graphics I have provided below, I am trying to open a Door using Conditional Branch: Switch and the Doors are not opening or doing anything. Now I fully understand that there is an easier way to do this (by Not using Conditional Branch) but I want to know what I am doing wrong so I can later apply this to the future of my game.

Thanks for Help

HELP.jpg

HELP2.jpg
Well, your first page only does something if switch 3 is turned on. Since the second page is conditioned BY switch 3, page 1 will never actually execute. If the switch is off, you will see the closed doors graphic, but nothing will happen when you interact with it.


Basically, when the condition on the first page is met and the commands would normally be executed, the condition on the second page is met and the second page will be active.


I suspect the switch is not turned on at any point, which is why you see the door but it doesn't react - the first page is active, and since the condition in the Conditional Branch is not met, nothing else inside the conditional branch will be run. You can verify this by looking at the debug window (F9 while playing) to see that switch 3 is off.


What do you WANT to happen when the switch is off?


Normally if you want to condition a door by switches, you would have the door graphic on a page with no conditions, and then your commands might say something about it being locked (there should be NO conditional branch around those commands). Then the second page would have the door graphic, be conditioned by the switch (in the page conditions section, above the graphic, not in the Conditional Branch section), and the commands would open the door, step you through, and transfer you to where you want to go.


If you want to do this with a Conditional Branch instead of using two pages, just get rid of the second page, call up the conditional branch on the first page, and check the ELSE box. Then put in what text you want to display when the switch is off.
It is just as Shaz says.

I cannot add much more to that than to inform you that both pages do the exact same thing.

Event your door using the method one page or the other, but not both.

Make sure that you have another event that set the global switch 3 to ON, for the events on the door to initialize.
Hi Everyone,


Thanks for the Help I really appreciate it but I want to add something to my Conditional Branch which is MOG's Chain Commands from this website: http://www.atelier-rgss.com/RGSS/System/ACE_SYS02.html


I have the conditional branch working now but I want the player to fulfill the Chain Commands before they can enter the doors. Now the issue is that, whether or not the player fulfills the Chain Commands, the doors will still open even if the player fails the Chain Commands. I want to the doors to open only if the player completes the Chain Commands.


Thanks for the Help!


I have provided Images below.


Here is the Script:


(On a Side Note: How do I put text in a drop down box so my post doesn't have be long?)


 <snip>

Help.png

Help2.png

Help3.png
the reason the player is always transferred is because the transfer command on the second page will always be accessed, no matter what you did in the chain commands.


Why do you make the second page at all? from what you tell us that page isn't needed at all and it causes your problem.
Hey,

I have deleted the 2nd Page of my event and it is still allowing players to enter the door even if they fail the Chain Commands.

I have provided an Image below.

HALP.png
According to your event, the door will open when switch 3 is ON, not when the proper chain command has been inputed.

I'm not at my computer now, so I can't be positive, but instead of placing the chain commands script call separately, try placing that script call within the conditional branch under 'script' and see if it works.
I have removed the script from your post. Please don't post other people's scripts here - a link is fine (there are several reasons for this, which I will tell you if you PM me).

If you DO post a script (say, a script of your own, or a modified section of a script), you can put it in spoiler tags to stop it taking up so much room:

Code:
[spoiler]... stuff here ...[/spoiler]
And you should also always put scripts in code tags, to preserve the script formatting - otherwise the indentation is lost making it harder to read, and the forum converts certain character sequences into emoticons so you can't read it anyway (it did this with one or two lines in the script you posted there).
Hey Everyone,

 

Thanks for the Help but I figured it out. The main issue was that for the door to actually work with the Chain Commands you would would have to make sure that @>Script: chain_commands(N) equals the Switch number [000N:____].

For example if @>Script: chain_commands(5) then the Conditional Branch would have to be Switch [0005:____]==On. Make sure the number in @>Script matches the Switch Number.

 

Thanks for all Help Everyone!

Original thread: https://forums.rpgmakerweb.com/threads/conditional-branch-switch-not-working.35127/