Variables and self switches

I got my event to work by adding an extra step but I'm wondering why didn't it work. I made a go get X item quest. When when have that item I had a parallel run event that summons the boss on the map. I tested the event and after the boss the dialog ran again and so did the fight. I thought lol self switch. But when I added the self switch to this event it stopped working. Now I don't use variables that much but I know how they are supposed to work and I set in this case variable 5 to the number of items and made a if statement that said if X item is = or > 10 summon boss and flip a control switch. Now I had the control variable and the if statement in the same event and I couldn't get them to work but when I split them up I got my event to work. So my question is based on what I've said (i'm sorry if this was hard to understand) is there a reason having the control variable and a if statement depending on that variable won't work? 
Can we see a screenshot of the events in question, please? That will make finding eventing errors way easier.




Note these were in the same event and I didn't need the meat switch. I also put the same line in there 2 times. I need to delete that.
c4rqe7ly.png


Works for me this way.

The 2nd event page is empty, I just ticked Self Switch A and made sure it's not a Parallel Event anymore.
I'm unsure what I did wrong but it looks like I did it right. Oh well I guess.
I see two things that are probably wrong there.

1) The EV002 is never turned off. Even after EV003 runs, EV002 will still check for the meat quantity and therefore, reactivate EV003. This is probably the main issue.

2) At the end of EV003, you assign ON to the MEAT control switch, instead of OFF.
Additionally you should add a wait to those parallel processes - without wait they're processed sixty times per second, and that creates lag.


A wait(10) would reduce that to six checks per second, probably still enough and a lot less lag

Original thread: https://forums.rpgmakerweb.com/threads/variables-and-self-switches.54097/