Parallel Proccess Condditional Loops Causing Game Freeze.

Hello everyone,

I'm having an extremely frustrating time with this problem, because it seems to me to be very arbitrary.

I have a parallel process running that adds one to a counter every time the player looks at a special object.  I only wanted this to happen once for each object, so I set up a series of conditional loops to this effect.  I also used this script to give me access to more self switches.  Here's a screenshot as an example:

ConditionalBranches.png​

So far, so good.  When I walk around town looking at things the counter goes up as expected, everything runs smoothly.  However, when I transferred to any other map and then returned again I would be frozen in place, unable to move to open the menu (other events such as villagers seemed to be carrying on as usual).

I spent a good deal of time trying to fix this event myself and while doing so I realized that it was only one of the objects that would trigger the freezing (a barrel of fish).  I could examine every other object and return without the anything freezing up.  What's strange is that there is nothing at all different about the fish barrel in the object counter event - it's the tenth in the list, but that's all that's noteworthy.  Events before and after it, all of which are identical, don't trigger a game freeze.  Heres a screenshot to confirm this:

Fish Barrel.png​
 ​
I don't know if my problem is to do with how I'm using the parallel process (I've never had this kind of problem before) or if it' something to do with the self switch script or if it's something else entirely.

Any help would be greatly appreciated.
I don't know about the cause of the error,but you do know there is zero need for a parallel process to accomplish what you are doing? Put the variable increment inside the event itself, and turn on the self switch A at the same time, and under the event page for self switch A, do not increase the varaible.

However, as for  your error, it sounds like an autorun is kicking in. Check for one of those.
Some of the objects being examined by the player are several tiles wide, so I can't use self switches that way to guarantee the counters only goes up by one for each object.  It is behaving exactly as though an autorun is kicking in, but that isn't the case here as far as I can tell.  The parallel process doesn't refer to any and the problem vanishes when I take the parallel process out of the scene.

------------

I've reconsidered actually; the method you suggested is possible through the use of regular switches, but I didn't want to create hundreds of new switches just for this - however, most of these events are already using a switch that I could tie in with this so it should be viable.

I'm still curious about weather anyone knows whats going on with this process, though?
I don't think you need a script nor a parallel running event.

As far as I can see you're using a parallel event to check the self switch states to turn on a switch if it meets a certain condition.

Couldn't you, when checking the events make that turn on the switch in the first place, and handle the variable? And make a 2nd page with the switch turned on condition, where it does nothing more in regards of the event?

For things that fill several tiles, but are used for the same object, have them all use the same switch, and they wont each count towards the goal.

Original thread: https://forums.rpgmakerweb.com/threads/parallel-proccess-condditional-loops-causing-game-freeze.39141/