Advertisement
M3rein

Quicksave Script

Oct 29th, 2017
1,567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.09 KB | None | 0 0
  1. class Scene_Map
  2.   alias quicksave_update update
  3.   def update
  4.     quicksave_update
  5.     if Input.trigger?(Input::F8) && !$game_player.moving? && @mode.nil?
  6.       pbSave
  7.       @mode = 0
  8.       @vp = Viewport.new(0,0,Graphics.width,Graphics.height)
  9.       @vp.z = 100000
  10.       @disk = Sprite.new(@vp)
  11.       @disk.bitmap = BitmapCache.load_bitmap("Graphics/Pictures/saveDisk")
  12.       @disk.x, @disk.y = 8, 8
  13.       @disk.opacity = 0
  14.       @arrow = Sprite.new(@vp)
  15.       @arrow.bitmap = BitmapCache.load_bitmap("Graphics/Pictures/saveArrow")
  16.       @arrow.x, @arrow.y = 8, -4
  17.       @arrow.opacity = 0
  18.     end
  19.     if @mode == 0
  20.       @disk.opacity += 16
  21.       @mode = 1 if @disk.opacity >= 255
  22.     end
  23.     if @mode == 1
  24.       @arrow.opacity += 16
  25.       @mode = 2 if @arrow.opacity >= 255
  26.     end
  27.     if @mode == 2
  28.       @arrow.y += 1
  29.       @mode = 3 if @arrow.y >= 22
  30.     end
  31.     if @mode == 3
  32.       @arrow.opacity -= 16
  33.       @disk.opacity -= 16
  34.       if @disk.opacity <= 0
  35.         @arrow.dispose
  36.         @disk.dispose
  37.         @vp.dispose
  38.         @mode = nil
  39.       end
  40.     end
  41.   end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement