Advertisement
kurashi

Full MapView [RGSS3]

Nov 30th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.11 KB | None | 0 0
  1. #   Full MapView (Individual Maps)
  2. #   Created by Kurashi
  3. #   Free for use commercial or not. (Credit Required)
  4. #
  5. #   Place this script below Materials and above Main
  6. #   This script is plug-n-play so long as you name the picture files for your map as such:
  7. #       map_#
  8. #   Where the # is the ID number of the map you want displayed.
  9. #   The file must also be placed in the Pictures folder of your project. Only PNG and Jpeg are supported.
  10.  
  11. class Scene_Menu < Scene_MenuBase
  12.   def create_command_window
  13.     @command_window = Window_MenuCommand.new
  14.     @command_window.set_handler(:item,      method(:command_item))
  15.     @command_window.set_handler(:skill,     method(:command_personal))
  16.     @command_window.set_handler(:equip,     method(:command_personal))
  17.     @command_window.set_handler(:status,    method(:command_personal))
  18.     @command_window.set_handler(:formation, method(:command_formation))
  19.     @command_window.set_handler(:fullmap,   method(:command_map))
  20.     @command_window.set_handler(:save,      method(:command_save))
  21.     @command_window.set_handler(:game_end,  method(:command_game_end))
  22.     @command_window.set_handler(:cancel,    method(:return_scene))
  23.   end
  24.   def command_map
  25.     SceneManager.call(Scene_FullMap)
  26.   end
  27. end
  28. module Cache
  29.   def self.fullmap(filename)
  30.     load_bitmap("Graphics/Pictures/", filename)
  31.   end
  32. end
  33. class Scene_FullMap < Scene_Base
  34.   def start
  35.     create_map
  36.   end
  37.   def create_map
  38.     map_id = $game_map.map_id
  39.     filename = "map_" + map_id.to_s
  40.     @map = Sprite.new
  41.     @map.bitmap = Cache.fullmap(filename)
  42.   end
  43.   def dispose_all_used_graphics
  44.     @map.bitmap.dispose
  45.     @map.dispose
  46.   end
  47.  
  48.   def update
  49.     super
  50.     triggers = [:A,:B,:C,:X,:Y,:Z,:L,:R]
  51.     triggers.each {|symbol|
  52.     return_scene if Input.trigger?(symbol)
  53.     }
  54.   end
  55.   def dispose_main_viewport
  56.   end
  57. end
  58. class Window_MenuCommand < Window_Command
  59.   alias :add_original_commands_fmk :add_original_commands
  60.   def add_original_commands
  61.     full_map_command
  62.   end
  63.   def full_map_command
  64.     add_command("Map", :fullmap, $fullMapViewable)
  65.   end
  66. end
  67. module STUFF
  68.     $fullMapViewable = true
  69. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement