Zoom at event/player

I need a script that through an event script call zooms in/out on an event/player. I found a script that zooms in but it looks like it freezes the game screen as it does it. Because of that sprite animation isn't playing and I need sprite animation to work. Is something like this even possible to do with VX or simulate such an effect?

This script in question:

Spoiler: SCRIPT
Ruby:
#===============================================================================
# Zoom Script
# By Jet10985 (Jet)
# Original Code by: Zeriab
# Small fixes by: Piejamas
#===============================================================================
# This script will enable the user to zoom in and out of the map. It also allows
# them to have a classic looking map transfer if they want it.
# This script has: 15 customization options.
#===============================================================================
# Overwritten Methods:
# None
#-------------------------------------------------------------------------------
# Aliased methods:
# Spriteset_Map: initialize, dispose
# Game_Temp: initialize
# Scene_Map: update_transfer_player, call_battle, perform_battle_transition
#===============================================================================
=begin
How to zoom anywhere:

to zoom in a specific part, use the following script in an Event "Script..."

zoom_screen(duration, end_value, player, fade, fade_duration)

duration = time in frames for zoom to complete. 60 frames = 1 second
end_value = how far in the zoom goes, as in 10x size or 5x size. Use just number,
no x.
player = does the zoom zoom-in on the player? true or false. false will make
it so the zoom will zoom-in in the event that calls the zoom.
fade = true or false. true make the screen fade to black while zooming.
fade_duration = how long does it take to fade in frames? 60 frames = 1 second

You must specify duration AND end_value, but not always the rest.
If the others aren't specified, they will default like so:
player will be true
fade will be false
fade_duration will be 1

Ex. zoom_screen(120, 10)
This will zoom in on the player with a 10x zoom, and will last for 2 seconds
with no fading.
--------------------------------------------------------------------------------
How to end zoom:

to end the zoom, use the following script in an Event "Script..."

end_zoom_screen(zoom_out)

zoom_out = true or false. if true, it will end by zooming out.
if false, it will just revert back to regular map.

You can just put end_zoom_screen and it will assume that zoom_out is true

end_zoom_screen automatically detects if a fade occured during the zoom, and will
fade back in automatically.
--------------------------------------------------------------------------------
Notes:

While zoomed in, the player will not be able to move.
Pictures and message windows can still be displayed.
Pictures must have a Z value of 200+ in order to show above the zoom.
=end

module JetZoomScript

  # When you transfer to a new map, do you want to have a cool zoom-in
  # transfer? If false, you can skip down to ZOOM_BATTLE_TRANSFER.
  ZOOM_TRANSFER = true

  # With the zoom transfer, do you also want the screen to fade to black,
  # then fade back normally when you're on the next map?
  ZOOM_AND_FADE = false

  # After the zoom transfer, you you want a zoom out effect instead of
  # just the map?
  ZOOM_OUT_AFTER_TRANSFER = false

  # While transfering, do you want the previous map to slowly become
  # intangible?
  USE_OPACITY_CHANGE_ON_ZOOMSHOT = true

  # What's the factor you want to zoom-in with on zoom transfers?
  TRANSFER_ZOOM_AMOUNT = 10

  # How long in frames does the transfer zoom take to zoom in?
  # 60 frames = 1 second
  TRANSFER_ZOOM_IN_TIME = 120

  # This is the acceleration factor of the transfer zoom. The lower the factor,
  # the higher it accelerates, so the higher the factor, the slower.
  TRANSFER_ZOOM_FACTOR = 2.3

  # How long in frames does the transfer zoom take to zoom out?
  # Don't bother with this if ZOOM_OUT_AFTER_TRANSFER is false
  # 60 frames = 1 second
  TRANSFER_ZOOM_OUT_TIME = 120

  # How long in frames does the transfer zoom take to fade to black?
  # Don't bother with this if ZOOM_AND_FADE is false
  # 60 frames = 1 second
  TRANSFER_ZOOM_FADE_IN = 120

  # How long in frames does the transfer zoom take to fade back into light?
  # Don't bother with this if ZOOM_AND_FADE is false
  # Also don't bother with this if ZOOM_OUT_AFTER_TRANSFER is false
  # 60 frames = 1 second
  TRANSFER_ZOOM_FADE_OUT = 120

  # If this switch is on, then transfer zoom will be temporarily disabled.
  NO_ZOOM_TRANSFER_SWITCH = 1

  # Instead of the lame default battle enter sequence, do you want
  # to zoom in on your character when entering into battle?
  ZOOM_BATTLE_TRANSFER = true

  # What's the factor you want to zoom-in with on zoom battle transfers?
  BATTLE_TRANSFER_ZOOM_AMOUNT = 10

  # How long in frames does the battle transfer zoom take to zoom in?
  # 60 frames = 1 second
  BATTLE_TRANSFER_ZOOM_IN_TIME = 100

  # This is the acceleration factor of the battle transfer zoom. The lower the
  # factor, the higher it accelerates, so the higher the factor, the slower.
  BATTLE_TRANSFER_ZOOM_FACTOR = 2.3

end

#===============================================================================
# DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
#===============================================================================
class Spriteset_Map

  alias jet4762_initialize initialize unless $@
  def initialize
    jet4762_initialize
    @disposed = false
  end

  alias jet7233_dispose dispose unless $@
  def dispose
    jet7233_dispose
    @disposed = true
  end

  def disposed?
    return @disposed
  end
end

class Scene_Map

  def spriteset
    return @spriteset
  end
end

class Game_Temp

  attr_accessor :player_height, :display_x, :display_y

  alias jet4672_initialize initialize unless $@
  def initialize
    jet4672_initialize
    @player_height = 0
    @display_x = 0
    @display_y = 0
  end
end

class Scene_Map < Scene_Base

  include JetZoomScript

  alias jet7833_update_transfer_player update_transfer_player unless $@
  def update_transfer_player
    if $game_switches[NO_ZOOM_TRANSFER_SWITCH] || !ZOOM_TRANSFER
      jet7833_update_transfer_player
    else
      return unless $game_player.transfer?
      zoom = (Graphics.brightness > 0 && $game_map.screen.brightness > 0)
      fadeout = ZOOM_AND_FADE ? TRANSFER_ZOOM_FADE_OUT : -1
      fadein  = ZOOM_AND_FADE ? TRANSFER_ZOOM_FADE_IN : -1
      zoom_screen(TRANSFER_ZOOM_IN_TIME, 1, TRANSFER_ZOOM_AMOUNT, fadeout) if zoom
      if !USE_OPACITY_CHANGE_ON_ZOOMSHOT && ZOOM_OUT_AFTER_TRANSFER or
        !USE_OPACITY_CHANGE_ON_ZOOMSHOT && ZOOM_AND_FADE &&
        !ZOOM_OUT_AFTER_TRANSFER
        @spriteset.dispose unless @spriteset.disposed?
        $game_player.perform_transfer
        $game_map.update
        @spriteset = Spriteset_Map.new if @spriteset.disposed?
      end
      $game_map.autoplay
      if ZOOM_OUT_AFTER_TRANSFER
        zoom_screen(TRANSFER_ZOOM_OUT_TIME, TRANSFER_ZOOM_AMOUNT, 1, fadein) if zoom
      end
      if ZOOM_AND_FADE && !ZOOM_OUT_AFTER_TRANSFER
        fadein(TRANSFER_ZOOM_FADE_IN)
      end
    end
  end

  def zoom_screen(duration, start_value, end_value, fade_duration)
    $game_temp.player_height = @spriteset.player_height
    $game_temp.display_x = $game_player.screen_x
    $game_temp.display_y = $game_player.screen_y
    Graphics.brightness = 255   
    @zoom_bitmap = Graphics.snap_to_bitmap
    @zoom_sprite = Sprite.new
    @zoom_sprite.z = 9999
    @zoom_sprite.bitmap = @zoom_bitmap
    if USE_OPACITY_CHANGE_ON_ZOOMSHOT && !ZOOM_OUT_AFTER_TRANSFER
      @spriteset.dispose
      $game_player.perform_transfer
      $game_map.update
      @spriteset = Spriteset_Map.new
    end
    do_zoom(duration, start_value, end_value, fade_duration)
    @zoom_sprite.dispose
    @zoom_bitmap.dispose
  end

  def do_zoom(times, start_value, end_value, fade_duration)
    value = start_value
    if start_value > end_value && ZOOM_AND_FADE
      Graphics.brightness = 0
    end
    for i in 0...times
      percent = (i.to_f / times) ** TRANSFER_ZOOM_FACTOR
      value = value + percent * (end_value - value)
      if USE_OPACITY_CHANGE_ON_ZOOMSHOT and !(start_value > end_value)
        @zoom_sprite.opacity -= 255 / TRANSFER_ZOOM_IN_TIME
        @zoom_sprite.update
      end
      if ZOOM_AND_FADE
        if start_value < end_value
          Graphics.brightness -= 255 / fade_duration
        elsif start_value > end_value
          Graphics.brightness += 255 / fade_duration
        end
      end
      zoom_sprite(@zoom_sprite, value)
      Graphics.update
    end
  end

  def zoom_sprite(sprite, amount)
    sx = $game_temp.display_x
    sy = $game_temp.display_y - $game_temp.player_height / 2
    gw = Graphics.width
    gh = Graphics.height
    width = gw * amount
    height = gh * amount
    x = [sx * amount - (gw / 2), 0].max
    x = [x, width - gw].min
    y = [sy * amount - (gh / 2), 0].max
    y = [y, height - gh].min
    sprite.zoom_x = amount
    sprite.zoom_y = amount
    sprite.ox = x / amount
    sprite.oy = y / amount
  end

  alias jet6592_call_battle call_battle unless $@
  def call_battle
    jet6592_call_battle
    if ZOOM_BATTLE_TRANSFER
      $game_temp.player_height = @spriteset.player_height
      $game_temp.display_x = $game_player.screen_x
      $game_temp.display_y = $game_player.screen_y
      Graphics.brightness = 255   
      @zoom_bitmap = Graphics.snap_to_bitmap
      @zoom_sprite = Sprite.new
      @zoom_sprite.z = 199
      @zoom_sprite.bitmap = @zoom_bitmap
      value = 1
      for i in 0...BATTLE_TRANSFER_ZOOM_IN_TIME
        percent = (i.to_f / BATTLE_TRANSFER_ZOOM_IN_TIME) ** BATTLE_TRANSFER_ZOOM_FACTOR
        value = value + percent * (BATTLE_TRANSFER_ZOOM_AMOUNT - value)
        zoom_sprite(@zoom_sprite, value)
        Graphics.update
      end
    end
  end

  alias jet4721_perform_battle_transition perform_battle_transition unless $@
  def perform_battle_transition
    if !ZOOM_BATTLE_TRANSFER
      jet4721_perform_battle_transition
    else
      @zoom_sprite.dispose
      @zoom_bitmap.dispose
    end
  end
end

class Spriteset_Map

  def player_height
    @character_sprites[-1].height
  end
end

class Game_Interpreter

  def zoom_sprite(sprite, amount)
    sx = $game_temp.display_x
    sy = $game_temp.display_y - $game_temp.player_height / 2
    gw = Graphics.width
    gh = Graphics.height
    width = gw * amount
    height = gh * amount
    x = [sx * amount - (gw / 2), 0].max
    x = [x, width - gw].min
    y = [sy * amount - (gh / 2), 0].max
    y = [y, height - gh].min
    sprite.zoom_x = amount
    sprite.zoom_y = amount
    sprite.ox = x / amount
    sprite.oy = y / amount
  end

  def zoom_screen(times, end_value, player = true, fade = false,
      fade_duration = 1)
    $game_temp.player_height = $scene.spriteset.player_height
    if player
      $game_temp.display_x = $game_player.screen_x
      $game_temp.display_y = $game_player.screen_y
    else
      $game_temp.display_x = $game_map.events[@original_event_id].screen_x
      $game_temp.display_y = $game_map.events[@original_event_id].screen_y
    end
    Graphics.brightness = 255   
    @zoom_bitmap = Graphics.snap_to_bitmap
    @zoom_sprite = Sprite.new
    @zoom_sprite.z = 199
    @zoom_sprite.bitmap = @zoom_bitmap
    value = 1
    @start_value = 1
    @[member=endriu]_value = end_value
    @fade = fade
    @fade_duration = fade_duration
    @times = times
    if 1 > end_value && fade
      Graphics.brightness = 0
    end
    for i in 0...times
      percent = (i.to_f / times) ** 2.3
      value = value + percent * (end_value - value)
      if fade
        if 1 < end_value
          Graphics.brightness -= 255 / fade_duration
        elsif 1 > end_value
          Graphics.brightness += 255 / fade_duration
        end
      end
      zoom_sprite(@zoom_sprite, value)
      Graphics.update
    end
  end

  def end_zoom_screen(zoom_out = true)
    if zoom_out
      value = @[member=endriu]_value
      if @[member=endriu]_value > @start_value && @fade
        Graphics.brightness = 0
      end
      for i in 0...@times
        percent = (i.to_f / @times) ** 2.3
        value = value + percent * (@start_value - value)
        if @fade
          if @start_value < @[member=endriu]_value
            Graphics.brightness -= 255 / fade_duration
          elsif @start_value > @[member=endriu]_value
            Graphics.brightness += 255 / fade_duration
          end
        end
        zoom_sprite(@zoom_sprite, value)
        Graphics.update
      end
    end
    @zoom_sprite.dispose
    @zoom_bitmap.dispose
  end
end

unless $engine_scripts.nil?
  JetEngine.active("Zoom Script", 1)
end
I had a similar event that I needed to zoom in, but instead of zooming in the screen, I found a script that can zoom a sprite and save the zoom. For the scene, I just photoshopped the map to be zoomed in as if the whole screen was zoomed.

This is the script I used:

Ruby:
#======================================================================#
#  Zoom Sprite V 1.0
#  ****** By Midnight Moon                                ******      #
# Descripcion: Script extendido del script Zoom Char de falcao, en cual
#  se permite hacer mas chico o mas grande el tamaño de los charas.
#  Se ha añadido que se pueda configurar tamaño default de los eventos
#  de un mapa.
#  El script de falcao se citara a continuacion.
#======================================================================#
#==================================================================#
#  #*****************#        Zoom char V 1.0 , Falcao script      #
#  #*** By Falcao ***#        Permite cambiar el tamao del chara  #
#  #*****************#        al antojo del usuario                #
#        RMXP                                                      #
# makerpalace.forumotion.com                                        #
#==================================================================#
module ConfigZoomSprite
#==================================================================#
  DataIMap = {
    2 => [1, 1],
    3 => [1, 1],
    90 => [2.5, 2.5]
  }
 
  # Tamaños por default de los eventos
  DataIPlayer = [1, 1]
  DataIVehicule = {
    0 => [1, 1],
    1 => [1, 1],
    2 => [1, 1]
  }
  DataIEvent = [1, 1]
 
  # ID de mapa con tamaño personalizado por default
  DataIConfig = {
    4 => {
      "Player" => [1, 1],
      "Event" => {
        1 => [1, 1]
      },
      "Vehicule" => {
        1 => [1, 1]
      }
    }
  }
 
#==================================================================#
end
#-------------------------------------------------------------------
# * Commands
#
# $game_player.zoom(x,y)      hace Zoom en el personaje
# Example.  $game_player.zoom(2,2) incrementa el doble
#
# $game_map.events[Event ID].zoom(x,y)  hace zoom en el chara del evento
# Example  $game_map.events[1].zoom(2,2)  el evento incrementa el doble
#
# $game_map.vehicles[Vehicule ID].zoom(x,y)  hace zoom en el Vehiculp
# Example  $game_map.vehicles[0].zoom(2,2)  el evento incrementa el doble
#
# Note: zoom soporta decimales
# El zoom por defecto es de "(1,1)"
#--------------------------------------------------------------------
 
class Game_Character
  include ConfigZoomSprite
 
  attr_accessor :zoom_x
  attr_accessor :zoom_y
  alias falcaozoom_ini initialize
  def initialize
    falcaozoom_ini
    @zoom_x = DataIPlayer[0]
    @zoom_y = DataIPlayer[1]
  end
  def zoom(x,y)
    self.zoom_x = x
    self.zoom_y = y
  end
end

class Game_Vehicule
  attr_accessor :zoom_x
  attr_accessor :zoom_y
  alias falcaozoom_ini initialize
  def initialize(type)
    falcaozoom_ini(type)
    @zoom_x = DataIVehicule[type][0]
    @zoom_y = DataIVehicule[type][1]
  end
  def zoom(x,y)
    self.zoom_x = x
    self.zoom_y = y
  end
end

class Sprite_Character < Sprite_Base
  alias character_zoom_update update
  def update
    character_zoom_update
    if @zoom_x != @character.zoom_x or
      @zoom_y != @character.zoom_y
      @zoom_x = @character.zoom_x
      @zoom_y = @character.zoom_y     
      self.zoom_x = @character.zoom_x
      self.zoom_y = @character.zoom_y
    end
  end
end

#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================
class Scene_Map
  include ConfigZoomSprite
 
  alias midnightmoon_transfer_player update_transfer_player
  def update_transfer_player
    midnightmoon_transfer_player
    unless DataIMap[$game_map.map_id].nil?
      $game_map.events.each do |x, y|
        $game_map.events[x].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1]) if y.character_name != ""
      end
      $game_map.vehicles[0].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
      $game_map.vehicles[1].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
      $game_map.vehicles[2].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
      $game_player.zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
    else
      $game_map.events.each do |x, y|
        $game_map.events[x].zoom(DataIEvent[0], DataIEvent[1]) if y.character_name != ""
      end
      $game_map.vehicles[0].zoom(DataIVehicule[0][0], DataIVehicule[0][1])
      $game_map.vehicles[1].zoom(DataIVehicule[1][0], DataIVehicule[1][1])
      $game_map.vehicles[2].zoom(DataIVehicule[2][0], DataIVehicule[2][1])
      $game_player.zoom(DataIPlayer[0], DataIPlayer[1])
    end
  
    unless DataIConfig[$game_map.map_id].nil?
      DataIConfig[$game_map.map_id]["Event"].each do |x, y|
        unless $game_map.events[x].nil?
          $game_map.events[x].zoom(y[0], y[1]) if $game_map.events[x].character_name != ""
        end
      end
      DataIConfig[$game_map.map_id]["Vehicule"].each do |x, y|
        unless $game_map.vehicles[x].nil?
          $game_map.vehicles[x].zoom(y[0], y[1])
        end
      end
      $game_player.zoom(DataIConfig[$game_map.map_id]["Player"][0], DataIConfig[$game_map.map_id]["Player"][1]) unless DataIConfig[$game_map.map_id]["Player"].nil?
    end
  end
end

#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================
class Scene_Title
  include ConfigZoomSprite
 
  alias midnightmoon_zoomsprite_command command_new_game
  def command_new_game
    midnightmoon_zoomsprite_command
    unless DataIMap[$game_map.map_id].nil?
      $game_map.events.each do |x, y|
        $game_map.events[x].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1]) if y.character_name != ""
      end
      $game_map.vehicles[0].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
      $game_map.vehicles[1].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
      $game_map.vehicles[2].zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
      $game_player.zoom(DataIMap[$game_map.map_id][0], DataIMap[$game_map.map_id][1])
    else
      $game_map.events.each do |x, y|
        $game_map.events[x].zoom(DataIEvent[0], DataIEvent[1]) if y.character_name != ""
      end
      $game_map.vehicles[0].zoom(DataIVehicule[0][0], DataIVehicule[0][1])
      $game_map.vehicles[1].zoom(DataIVehicule[1][0], DataIVehicule[1][1])
      $game_map.vehicles[2].zoom(DataIVehicule[2][0], DataIVehicule[2][1])
      $game_player.zoom(DataIPlayer[0], DataIPlayer[1])
    end
    $game_map.interpreter.update
  end
end
Are you sure that the script you posted is for RPG maker VX? Is says at the top RMXP.

And what did you do for the transition? Did you like fade out, transition then fade in?
Yep, I've been using it in my game in RMVX. I think the original was made by Falcao for XP but Midnight Moon converted it to VX.

It works perfectly for what I needed. Give it a go and see if it works for what you need. So far, I have used it for 2 scenes, one just a sprite I needed to have 0.5x zoom just to look like they're far away. And the second one I needed like 3x zoom to make it look like a POV shot. For both, they just stick to that zoom level for the entire scene, so I didn't really need it to transition to anything.

If you need something in particular of what to do, let me know and I can see if I can work it out with that script.
I just tried it and as soon as I call $game_map.events[19].zoom(2,2) the sprite zooms but then the sprite instantly reverts to its original size.
Do I need to do something else so the sprite stays zoomed in?
You have to make the event Autorun or Parallel Process. You can also customise it from the script
DataIConfig = {
4 => { #This will be the map ID
"Event" => {
42 => [2, 2] #Event ID 42 will be 2x2 zoom in Map ID 4

(I think that's how that works, I just use the autorun way)
These should do it

Original thread: https://forums.rpgmakerweb.com/threads/zoom-at-event-player.172913/