Trying to use a control variable in 2 events.

I'm trying to creating a condition that acts when a variable has changed. 

It between 2 events. The player finds the first event, the variable changes, and then the second event is supposed to see if the variable has changed, and respond properly. 

This is a problem that I need to fix, as I have to publish this demo in 2 days, and I really don't want to push back the deadline again.
In your second event you have a conditional which checks the variable.

If it is the value you want, then A happens

If it is not then B (or nothing) happens.

If that's not your problem, then you need to describe it in a lot more detail if we are to help you.
In your second event you have a conditional which checks the variable.

If it is the value you want, then A happens

If it is not then B (or nothing) happens.

If that's not your problem, then you need to describe it in a lot more detail if we are to help you.
YES! That's it! 

I do a have a condition setup like that, but it's not working. I'm using an If...Else condition. Is there any way to copy the code from the even page and paste it here so I can show you?
no, you have to make a screenshot of the entire event page - and please, do not crop that screenshot to content only. We need the entire page window because an event is more than just the content, and the settings for that event page and even the numbering of the event pages can change the result of the logic.


How to take a Screenshot:


You've heard people say to take a screenshot, but how does one take a screenshot of their game? Simple, while the game is running, hit the Prt Scr button on your keyboard, which is located right next to your F12 key. If you're using a laptop, you might have to use the Fn key in combination with the Prt Scr key to get it to work.

Now that you've pressed the button, it's time to paste this screenshot into an image editing software. If you don't have anything fancy such as Adobe Photoshop, GIMP or Paint.NET, no worries; you can use MS Paint instead. Open up your image editing software, create a new file, and then hit ctrl+v on your keyboard, or simply right click on the screen and select paste. This should instantly paste the screenshot into your image editing software. You can go ahead and crop the image to suit your needs, or if you don't even know what that means, you can just upload it as it is.

Save the image as a PNG, or if you really need to, as a high quality JPG.


How to upload the image to the forums


Now that you have you have an image on your computer you'd like to show us, how can you get it to show up on the forums? Firstly, you need to find an image hosting site, photobucket.com or imageshack.us are popular ones. If you have another image uploading website, great - use that one! Either way, upload it to the site, and then get the direct link. Don't get the resized link, or the thumbnail link, but the direct URL. You'll know you have the direct URL if the URL ends with the file extension you saved your image in (which will hopefully be .png).



Once you have this direct URL to your image, simply use the IMG tags in your forum post and paste the URL in between them. If this image is big, please leave the image in spoiler tags.

IMG tags:
image.png
Here is the first event

M2O3mhX.jpg


At the end of the event, it switches to the second event page, where I change the variable:

mAVgTgE.jpg


When the other event is triggered, it's supposed to see that the event has changed, and start accordingly.

The conditional branch is to check if the variable has changed from 0 to 1:

DgAf1CS.jpg


But when the event is called: it responds as if the event condition hasn't been met (else):

q4Nki6i.jpg


What am I missing?
First, I cannot see why you have put that variable on a second page.  Because that page is Action Button, unless something interacts with it, that command is never executed so the variable is never increased.  Move it back to your first page and insert it before Self Switch A is turned on.

All should now run.
First, I cannot see why you have put that variable on a second page.  Because that page is Action Button, unless something interacts with it, that command is never executed so the variable is never increased.  Move it back to your first page and insert it before Self Switch A is turned on.

All should now run.
Oh man...I didn't even see that. Let me make the changes, and I'll keep you posted.

Edit: that worked. Thank you for all the help everyone.
One additional hint for your Event 006: If a transfer command sends the player to a different map, then any commands after the transfer should be on the new map.


That has several reasons (Events reset on map loading, and better to find them at bughunting, and a few more).


I can't see if that transfer is on the same map or not, but if it goes to another map then it should be the last command of the event.


This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-use-a-control-variable-in-2-events.41711/