The PokéCommunity Forums Fan Games Game Development Scripts & Tutorials
Essentials Tutorial Generation 5 Door Zoom Animation

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Thread Tools
Old October 18th, 2017 (5:31 AM). Edited October 18th, 2017 by Marin.
Marin's Avatar
Marin Marin is offline
Not Bored
Join Date: Nov 2016
Age: 16
Gender: Other
Posts: 761
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.
 def pbZoomIn
  $zoom.dispose if $zoom
  vp =,0,Graphics.width,Graphics.height)
  vp.z = 1000000
  $zoom =
  $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
def pbUpdateZoom(time)
  time.times do
	$zoom.zoom_x += 0.01
	$zoom.zoom_y += 0.01
def pbFadeOutZoom
  32.times do
	$zoom.zoom_x += 0.01
	$zoom.zoom_y += 0.01
	$zoom.opacity -= 255 / 32.0

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)

  • Marin
Reply With Quote

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 1:29 PM.