• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Essentials Tutorial] Generation 5 Door Zoom Animation

  • 961
    Posts
    8
    Years
    • Age 23
    • Seen Nov 28, 2022
    You know how in generation 5, you had this zoom animation for doors?
    [PokeCommunity.com] Generation 5 Door Zoom Animation


    And this replicates that:
    [PokeCommunity.com] Generation 5 Door Zoom Animation



    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:
    [PokeCommunity.com] Generation 5 Door Zoom Animation

    You can change the number "48" to change how long the zooming takes (and thus how far it zooms in)


    Credits
    • Marin
     
    Last edited:
    Back
    Top