• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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

  • 971
    Posts
    8
    Years
    • Age 22
    • 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