Lock camera in place

Hi all,

is there a script to lock the camera in its current position, so it won't follow the player anymore?
And if necessary, a script to unlock it again?

I'm not looking for a plugin - if it's not possible by script, I'll swap the Hero with an NPC.

Thanks!
This thread has a script solution
Thank you! It's a little shaky, I guess it gets reset to that position after every frame. But I think, I can figure something out. Locking the camera to an event is an idea that didn't occur to me.
The place you are putting the player is bigger than the screen?
The map itself is bigger than the game's resolution, yes.
I have a cutscene, and the Hero walks off. Got it done, I was just looking for the best method to do it.
Disable scroll itself is easy.

$gamePlayer.updateScroll = function(){};

Enable scroll:

delete $gamePlayer.updateScroll

Center on player:

$gamePlayer.center($gamePlayer.x, $gamePlayer.y);
Disable scroll itself is easy.

$gamePlayer.updateScroll = function(){};

Enable scroll:

delete $gamePlayer.updateScroll

Center on player:

$gamePlayer.center($gamePlayer.x, $gamePlayer.y);
Thank you! That is what I was hoping for.

Original thread: https://forums.rpgmakerweb.com/threads/lock-camera-in-place.174104/