I added an if statement to an event and now I can't move my player

I'm still new to this so bare with me. I'm enjoying the learning curve.
There's a town 3 tiles away from the player spawn. I created a token system, if the player is holding the hidden item (aka token) then the cutscene level will load. else, the regular level will load.

Unfortunately, this has rendered my character unmovable.
I even tried to force him to move by creating a player touch event where he spawns, with movement commands.
This event didn't function.

Prior to the if statements, this was working fine.

I realize I could just use a self control switch to make sure the cutscene only plays once. But I've found that sometimes this operation is ignored, and sometimes it works perfectly. So I opted for a "token" system, just a hidden item that secretly gets added and subtracted, and triggers a thing if it's in the players possesion.

Why does this player touch event prevent any movement?
Event here:
For context:
What a pity you didn't include the entire event. The prime suspects are all on the event page, but you cropped them out.
What a pity you didn't include the entire event. The prime suspects are all on the event page, but you cropped them out.
My apologies, here's the full event page:
Well, you have the event waiting for 35 seconds before it transfers them - are you saying it stays frozen longer than that?

For that matter...which branch does it freeze on? Does the same thing happen whether the player has the token or not? You never said. Does the image display? You gave little information to go on.

Aside from that very long wait, I don't see anything wrong in your event. The usual suspect when you can't move is there is an event already doing things, perhaps an autorun. Are you certain there are no other events placed on that map?

I realize I could just use a self control switch to make sure the cutscene only plays once. But I've found that sometimes this operation is ignored, and sometimes it works perfectly.
Just to mention it...this is not true. If you set your event self-switches and the event page order correctly, it can never be ignored.
You're forcing your players to watch the same picture for 35 seconds. This is a considerable amount of time during which people can't do anything, and nothing is happening on screen. Most people will think the game has frozen long before the 35 seconds are over. I know I would, and I assume that's the "problem" you're experiencing.

Maybe you only meant to make the players wait for 2100 milliseconds instead? In that case, you should change your wait time to 126 frames. RPG Maker MZ uses 60 FPS as a reference speed, so 1 second is equivalent to 60 frames.

Also, the event has priority "same as characters", so the event will trigger when the player is next to it and trying to move towards it. And since you didn't enable the "Through" option, the event acts as a physical obstacle for the player. It seems you want the event to trigger when the player is standing on top of it instead. In that case, you would need to set the priority to "below characters".
Well, you have the event waiting for 35 seconds before it transfers them - are you saying it stays frozen longer than that?

For that matter...which branch does it freeze on? Does the same thing happen whether the player has the token or not? You never said. Does the image display? You gave little information to go on.

Aside from that very long wait, I don't see anything wrong in your event. The usual suspect when you can't move is there is an event already doing things, perhaps an autorun. Are you certain there are no other events placed on that map?


Just to mention it...this is not true. If you set your event self-switches and the event page order correctly, it can never be ignored.
The character is unable to move as soon as I load into the world map, before I even reach the event. in the position shown in the screenshot above. I gave that information in the screenshot showing the map. Apologies that you missed it, I should have made it more obvious.

The wait is there to allow the voiceover to complete. Then, the game transfers the player to the next area. There's a static image displayed as the voiceover is played, but that's a placeholder image.

I'm not sure why, but sometimes self-switches refuse to work. Even copy-pasted working events, pasted in another location, suddenly doesn't work. I'm still a beginner, I'm still learning and will eventually figure out what I'm doing wrong there.

You're forcing your players to watch the same picture for 35 seconds. This is a considerable amount of time during which people can't do anything, and nothing is happening on screen. Most people will think the game has frozen long before the 35 seconds are over. I know I would, and I assume that's the "problem" you're experiencing.

Maybe you only meant to make the players wait for 2100 milliseconds instead? In that case, you should change your wait time to 126 frames. RPG Maker MZ uses 60 FPS as a reference speed, so 1 second is equivalent to 60 frames.

Also, the event has priority "same as characters", so the event will trigger when the player is next to it and trying to move towards it. And since you didn't enable the "Through" option, the event acts as a physical obstacle for the player. It seems you want the event to trigger when the player is standing on top of it instead. In that case, you would need to set the priority to "below characters".
There's a voiceover playing. Eventually I'll add several pictures that change as the voiceover plays, when I learn how. For now, it's just 1 static picture and the player listens to the evolving plot. That's the extent of my knowledge in that regard, but I'm learning as I go. I understand the 60FPS per second logic, the timing is there to allow the voiceover to finish.

I've tried with all possible priorities, I get the same results. I'm still looking into it, if I can't figure out the problem I'll try a different approach.
The character is unable to move as soon as I load into the world map

Ok, this sounds like you have another event on that map, which has an "Autorun" trigger.

Autorun events run as soon as the map is loaded (and all conditions are met). These events are blocking, meaning the player can't do anything while an autorun event is running.

If you need to have an event run in the background while still allowing the player to move, you need to use a "Parallel Process" trigger instead. Also note that too many Parallel Process events can considerably slow down your game, so try not to overuse them.
The character is unable to move as soon as I load into the world map,
sounds like an autorun event on the world map. or the transfer event it activating an autorun common event. either way it has nothing to do with the event you posted the screenshot of.
as said above the problem has nothing to do with the event you've shown.

However before we go into the wrong direction I would like clarifications on a few points:

Is the player able to turn around?
Being completely frozen (unable to turn) is a different problem than being unable to move (but still able to turn)

If you make a new map (completely empty, grass only) and change the event that transfers the player from the current map to the new map, is he still unable to move on the grass map?
That will point if the problem is on the map or caused by the transfer event
Is the player able to turn around?
Being completely frozen (unable to turn) is a different problem than being unable to move (but still able to turn)
also good possibility. i always overlook that could be a tileset issue and having nothing to do with events.
is this happening the the 1st time going to the world map or only when leaving a specific location?

edit: after re-reading the OP "3 tiles away from player spawn" meaning this is where you start the game? and "hidden item secretly added" meaning autorun event on new game load?

guessing the event adding the token item is the issue.
autorun event dont just play through the contents once and end, they will loop forever as long as the page conditions are still met. since its a newgame event would mean it has no page conditions.
the token item event needs to turn on a self switch and have a 2nd page with no contents or triggers just the switch as a page condition.

(it sounds like you had it working right before adding the if statement and hidden item and just had the self switch and page conditions wrong before. page 1 would be the cutsceen version (turning on self switch right after "erase picture") and page 2 with self switch condition would be what you have as the else branch now)
sounds like an autorun event on the world map. or the transfer event it activating an autorun common event. either way it has nothing to do with the event you posted the screenshot of.
This was it! The event I posted here is working fine. I had a rogue autorun event I was playing with before making the event I posted here, and completely forgotten about it. Thanks for pointing me in the right direction. This issue is resolved now.

Ok, this sounds like you have another event on that map, which has an "Autorun" trigger.

Autorun events run as soon as the map is loaded (and all conditions are met). These events are blocking, meaning the player can't do anything while an autorun event is running.

If you need to have an event run in the background while still allowing the player to move, you need to use a "Parallel Process" trigger instead. Also note that too many Parallel Process events can considerably slow down your game, so try not to overuse them.
Yup you were right. I had forgotten about an autorun event I was playing around with, before working on the event I posted here. The issue is resolved now, and thanks for explaining Parallel Process events, I didn't know what they were for. I'll play around with those, but as you say, I won't go overboard and slow down my game.

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/i-added-an-if-statement-to-an-event-and-now-i-cant-move-my-player.137822/