Script for Screen Zoom help?

I have been using a script to zoom-in (bring the camera closer) and it has worked great... Up until trying to change the scale! Here is the script I'm using by creating an event and typing this into the script line:

$gameScreen.setZoom(Graphics.width / 2, Graphics.height / 2, 2)

It works perfectly until I try to change the scale. I don't think I wrote down what the variables are (where the '"2's" are), so when I change the numbers to, say, 1.5, although the game zooms appropriately, everything is off-center.

Can anyone figure out what those values mean? I don't want to use a plugin for this if I can help it, since most plugins interfere with the Yanfly Core Engine I'm using. Any help would be appreciated!
Hi!
the code that I use, and work flawlessly is this:
Code:
$gameScreen.startZoom(X, Y, SCALE, FRAMES);

This will set the zoom to default:
Code:
$gameScreen.clearZoom();

Ex: $gameScreen.startZoom($gamePlayer.screenX(), $gamePlayer.screenY(), 2.0, 60);
Zoom in the player position with scale of 2 and the duration for the zoom to the default scale to the scale i choose is 60 frames.
If you change map or open the menu, the zoom will return to normal.
Moved to: Learning JavaScript
This is probably your best bet for getting help on this issue without the use of plugins.

Original thread: https://forums.rpgmakerweb.com/threads/script-for-screen-zoom-help.111844/