• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
(v19+)Fly animation

Resource (v19+)Fly animation 3.0.1

A.I.R

From a separated Universe
Member
Joined
Feb 28, 2023
Posts
118
I like the idea, but I'm not able to use it, since I removed HM's from my game and I'm using the advanced HM Item https://eeveeexpo.com/resources/981/.
Can you make this plugin compatible with that one so whenever I use the Item to Fly I can see the Fly animation?
 
Last edited:
I'm glad to stop by here from time to time to see how many of my old scripts are still being updated by the community. Thanks for the contribution, and I hope that many of you can continue to enjoy this and many other scripts that I've seen being updated. It's wonderful to see how, even after 8 years, these kinds of contributions are still alive 😄
 

Attachments

  • Screenshot 2024-02-23 175218.png
    Screenshot 2024-02-23 175218.png
    212.2 KB · Views: 15
It just doesnt work for me i didn't know where to put the files
Looks like you only extracted the Plugins Folder, you have to extract all the folders in your project root (the game main folder where Graphics Data Plugins Game.rxproj Game.exe.... Etc is located) to make sure all the files are there.
 
Yup. After unzipping the folder, move the entire Graphics folder from that one into the Graphics folder in Essentials.
 
Report: Player's overworld sprite disappears after entering the game. After using Fly, the sprite appears again.
I am using v21.1 (and unofficial Following Pokemon EX port)
 
With newer Essentials versions, animations that were previously tied to framerate have to use delta time to have the proper speed. It's especially fast on higher refresh rate monitors (mine is 165, so the game runs at that framerate, meaning the animation was way too fast).

Assuming BIRD_ANIMATION_TIME was the amount of frames at 40 FPS, I changed that value to 0.25 (10/40 = 0.25 seconds) and then rewrote the script to work with that duration:

Ruby:
Expand Collapse Copy
#===============================================================================
# ■ Fly Animation by KleinStudio
# http://pokemonfangames.com
#===============================================================================
# A.I.R (Update for v21.1)
#===============================================================================
class Game_Character
  def setOpacity(value)
    @opacity = value
  end
end
#-------------------
# Animation
#-------------------

def pbFlyAnimation(landing = true)
  if landing
    $game_player.turn_left
    pbSEPlay("flybird")
  end
  width = Settings::SCREEN_WIDTH
  height = Settings::SCREEN_HEIGHT
  @flybird = Sprite.new
  @flybird.bitmap = if SHOW_GEN_4_BIRD == false
                      RPG::Cache.picture("flybird")
                    else
                      RPG::Cache.picture("flybird_gen4")
                    end
  @flybird.ox = @flybird.bitmap.width / 2
  @flybird.oy = @flybird.bitmap.height / 2
  @flybird.x  = width + @flybird.bitmap.width
  @flybird.y  = height / 4
  center_x  = width / 2 + 10
  center_y  = height / 2
  exit_x    = -@flybird.bitmap.width

  x_in = (center_x - @flybird.x) / BIRD_ANIMATION_TIME
  y_in = (center_y - @flybird.y) / BIRD_ANIMATION_TIME
  x_out = (exit_x - center_x) / BIRD_ANIMATION_TIME
  y_out = (@flybird.y - center_y) / BIRD_ANIMATION_TIME

  start_time = System.uptime
  loop do
    delta = System.uptime - start_time
    start_time = System.uptime

    if @flybird.x > center_x
      @flybird.x += x_in * delta
      @flybird.y += y_in * delta
      @flybird.x = center_x if @flybird.x < center_x
    elsif @flybird.x >= exit_x
      @flybird.x += x_out * delta
      @flybird.y += y_out * delta
      $game_player.setOpacity(landing ? 0 : 255)
    else
      break
    end

    pbUpdateSceneMap
    Graphics.update
  end
  @flybird.dispose
  @flybird = nil
end

Free for anyone to use under the same stipulations/credits/whatever, OP can update the resource with this (and the new duration) if they want.
 
Back
Top