Resource icon

Generation 5 Door Zoom Animation

Pokémon Essentials Version
v17.2 ✅
You know how in generation 5, you had this zoom animation for doors?


And this replicates that:



To achieve this, you have to do the following:
Put this code in a new section or somewhere else. Doesn't really matter.
Code:
 def pbZoomIn
  $zoom.dispose if $zoom
  vp = Viewport.new(0,0,Graphics.width,Graphics.height)
  vp.z = 1000000
  $zoom = Sprite.new(vp)
  $zoom.bitmap = Graphics.snap_to_bitmap
  $zoom.x = $zoom.bitmap.width / 2
  $zoom.y = $zoom.bitmap.height / 2
  $zoom.ox = $zoom.bitmap.width / 2
  $zoom.oy = $zoom.bitmap.height / 2
end
 
def pbUpdateZoom(time)
  time.times do
	Graphics.update
	Input.update
	$zoom.zoom_x += 0.01
	$zoom.zoom_y += 0.01
  end
end
 
def pbFadeOutZoom
  32.times do
	Graphics.update
	Input.update
	$zoom.zoom_x += 0.01
	$zoom.zoom_y += 0.01
	$zoom.opacity -= 255 / 32.0
  end
  $zoom.dispose
end

Now, for your door event, this is what it should look like:

You can change the number "48" to change how long the zooming takes (and thus how far it zooms in)
Credits
  • Marin
Author
Marin
First release
Last update
Rating
5.00 star(s) 2 ratings

More resources from Marin

Latest reviews

Thanks I've been wanting this for a while now works perfectly
Love you Marin! It really is a awesome feature!!! Its very easy to use and works smootly!
Top