Trouble halting the players movement for a mini scene

First off, thank you everyone who has been helping me out on my game so far!!

I’ve gotten stuck on one more thing, and can’t seem to find any specific place for help, no matter where I look.

Essentially, I have my platform character, I’ll name them ‘Sam’

I want the player to be able to move Sam however they like! Until Sam collides with a background object.

When the two collide, I want the Sam to halt all movement, so a mini scene can start, and then when the scene ends, I want Sam to be movable again.

I also want to use this to stop Sam from moving when a dialogue box opens up as well. For some reason I just can’t find any direct information anywhere, and I’m completely stumped again. So is there a way to ‘pause’ Sam’s movements, move them with actions as I want, and then release them so the player can move Sam again.

If that makes sense?

Thank you in advance again!

You could try disable platform behavior on Sam Sprite, or crate a global variable like g_player_can_move = 1 at the begining of the scene then when Sam collides to something like a sign or NPC set variable g_player_can_move = 0 and check in events
if g_player_can_move =1
platform behavior yes
if g_player_can_move =1
platform behavior no

Hey!! This helped perfectly!!! Thank you very much for your help!

1 Like