Turning on the switch freezes the game

I have a major problem right here. It all started when I was making a forest maze on the world map and I wanted to add a switch that opens the gate in front of the treasure. When I playtest it and turn on the switch, it slows down drastically and freezes the playtest. I couldn't move my character and didn't know what to do.

I also have the zip file to show the example of the switch freezing.
Can you show me the setup of the event?
we cant help you without additional information. at that point, we can only give general advce.

you didnt show us what the event looks like, so we cant say anything about your event. check if theres a separate parallel event on the map or a common event running off of that same switch

You didnt mention plugins, but if you have any, make sure that theyre properly configured and that youre not using some reserved switch.
It sounds like that switch is turning on an Autorun event, either on the map or in a common event. That's the most common cause for you being unable to move.
ll join the others in saying that without a screenshot of the code, it could be anything. You might have also activated a path for the player that can't be completed due to obstacles.
it slows down drastically and freezes the playtest
so, which one is it? massive slowdown or instant freeze?
as Turan says, an instant freeze is usually caused by an autorun event that takes over the process, usually on a closed loop.
a massive slowdown could be due to that switch triggering a lot of parallel events that move events or pictures.
Can you show me the setup of the event?
Sure.

You didnt mention plugins, but if you have any, make sure that theyre properly configured and that youre not using some reserved switch.

There are no plugins in this problem.

a massive slowdown could be due to that switch triggering a lot of parallel events that move events or pictures.
I think it is a massive slowdown.

ll join the others in saying that without a screenshot of the code, it could be anything. You might have also activated a path for the player that can't be completed due to obstacles.
I have set up the event right here.
Show me the entire event dialog, please, not just the event commands. And other pages if it has them.
Show me the entire event dialog, please, not just the event commands. And other pages if it has them.
This is not the event you interacted with in the video you posted.
This is not the event you interacted with in the video you posted.
Oh, my mistake. It's this one

ll join the others in saying that without a screenshot of the code, it could be anything. You might have also activated a path for the player that can't be completed due to obstacles.
The switch drastically drops the FPS from 60 to 0 when turned on.
You really should name your switches so you know what function they are serving.
While there is nothing that can be determined with certainty from your screenshots, the fact that it is switch 001, and that you didn't properly give it a name, suggests to me that in all likelihood you have used that same switch (either intentionally or unintentionally) somewhere else, such as a parallel or autorun common event, or another event on the same map.

I would check all events on that map as well as all of your common events to see if switch001 has already been used.

In the future, I highly recommend you give your switches and variables names that will remind you of their function. For example you said this is for a maze, so perhaps "MazeCompletion" might be a good name for it.

Additionally, just a personal recommendation; I recommend not using Switch001. Technically, there is nothing wrong with using this switch. However, some plugins may use game switches and set their default switch to Switch001 (or Variable001).
You should always change default plugin parameters when that is the case, but just to err on the side of caution, I would reserve switch001 for plugins.
Sicuro.



Non ci sono plugin in questo problema.


Penso che si tratti di un rallentamento enorme.


Ho organizzato l'evento proprio qui.
Ok. Here you’re making the player move towards coordinates 40, 77. There might be obstacles or impassable tiles along the path.

I might be wrong, but the script you’re using (Move to: 40, 77) seems to come from Galv's plugin for setting movement routes. If that’s the case, I would check the syntax. It might be 'MoveTo,' but I can’t be precise right now, I’d need to verify.

Another thing. I would also check if switch 1 activates events (or common events) in parallel.

In any case, after opening the gate, I would set switch 1 to off.
Ok. Qui stai facendo muovere il giocatore verso le coordinate 40, 77. Potrebbero esserci ostacoli o tessere impraticabili lungo il percorso?

Potrei sbagliarmi, ma lo script che stai usando (Move to: 40, 77) sembra provenire dal plugin di Galv per impostare il percorso di movimento. Se è così, controllerei la sintassi. Potrebbe essere 'MoveTo', ma non posso essere preciso in questo momento, dovrei verificare.

Un'altra cosa. Vorrei anche controllare se lo switch 1 attiva eventi (o eventi comuni) in parallelo.

In ogni caso, dopo aver aperto il cancello, imposterei l'interruttore 1 su off
This is an English speaking website, so please post an English translation in addition to the Italian language of your post.
Furthermore, the OP says that their native language is English, so they may be unable to read your response.
I suggest you check the common events that you are NOT using.
switch 1 is automatically set as the condition if turning a common event to parallel or autorun.

if you had experimentally turned a common event to autorun while exploring your options and forgot to turn it back, that parallel would activate when that switch is used. and an empty parallel would still take quite some processing power away.

and please post a screenshot of your plugin manager so that we can see what plugins you have, even if it's only the default ones or if you think they have nothing to do with this problem.
1726045328245.png


Here it is, I remembered correctly. The script comes from a plugin, the Events and Movement Core by Visustella (not Galv as I initially thought). What connection is there between the screen codes? Perhaps it would be useful to test the mechanic on an empty project and see if there are plugins that conflict or if it's a coding error.
I suggest you check the common events that you are NOT using.
Thank you so much; that solved the problem!
This thread is closed due to the problem being indicated as solved. If you need it reopened, report it to let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/turning-on-the-switch-freezes-the-game.171806/