Introduction Okay, I've animated the Game Over screen, the title screen, and now the menu background. What next
Features Same as with my other two animation scripts, this adds a bi-layered animated background to anything that uses a menu background, even though it was originally intended for the main game menu.
Script
Munkis' Animated Menu Back
CODE
#------------------------------------------------------------------------------ # * Munkis' Picture-backing for Main Menu V 1.2 # * Made by munkis # ╔══════════╗ # ║ FEATURES ║ # ╚══════════╝ # * Adds an animated bi-layered background to the main menu. # * Overwrites create_menu_background, dispose_menu_background, and # update_menu_background methods of Scene_Base. # * V 1.0: Initial release # * V 1.1: Added window opacity toggle. # * V 1.2: Added option to toggle animation with an in-game switch. #------------------------------------------------------------------------------
module MNK_Picture_Back
#[Background picture name, Foreground picture name, Background animation #speed (X direction), Background animation speed (Y direction), Foreground #animation speed (X direction), Foreground animation (Y direction), window #opacity, toggle switch] Set the animation speeds to negative values to make #them go in reverse. Use "" for no picture.
class Scene_Base def create_menu_background @menuback_sprite = Sprite.new @menuback_sprite.bitmap = $game_temp.background_bitmap @menuback_sprite.color.set(16, 16, 16, 128) unless $game_switches[MNK_Picture_Back::ANIMATION_PROPERTIES[7]] == true @menu_back = Plane.new @menu_back.bitmap = Cache.picture(MNK_Picture_Back::ANIMATION_PROPERTIES[0]) @menu_fore = Plane.new @menu_fore.bitmap = Cache.picture(MNK_Picture_Back::ANIMATION_PROPERTIES[1]) end update_menu_background end #-------------------------------------------------------------------------- # * Dispose of Background for Menu Screen #-------------------------------------------------------------------------- def dispose_menu_background unless $game_switches[MNK_Picture_Back::ANIMATION_PROPERTIES[7]] == true @menu_back.dispose @menu_fore.dispose end @menuback_sprite.dispose end #-------------------------------------------------------------------------- # * Update Background for Menu Screen #-------------------------------------------------------------------------- def update_menu_background unless $game_switches[MNK_Picture_Back::ANIMATION_PROPERTIES[7]] == true @menu_back.ox += MNK_Picture_Back::ANIMATION_PROPERTIES[2] @menu_back.oy += MNK_Picture_Back::ANIMATION_PROPERTIES[3] @menu_fore.ox += MNK_Picture_Back::ANIMATION_PROPERTIES[4] @menu_fore.oy += MNK_Picture_Back::ANIMATION_PROPERTIES[5] end end end class Window_Base < Window alias munkis_menu_initialize initialize def initialize(x, y, width, height) munkis_menu_initialize(x, y, width, height) self.opacity = MNK_Picture_Back::ANIMATION_PROPERTIES[6] end end
Required Images
You can either use these in your project, or as a placeholder until you get someone to make what you want.
Images
Customization Just take a peek at the config module, it's easy enough to understand.
Compatibility Overwrites create_menu_background, dispose_menu_background, and update_menu_background methods of Scene_Base.
Screenshot Put the script in a project to see it in action.
DEMO The script is pretty simple to use, so a demo shouldn't be necessary.
Installation Place in MATERIALS, above MAIN.
FAQ Q: ZOMG teh scriptz doesn't werk!!! A: First of all, be more specific. Second, all reports typed in chat-speak or 1337-speak will be ignored.
Terms and Conditions I don't mind this script being posted or linked on other sites AS LONG AS YOU GIVE CREDIT!!! Same goes for using this in your project. Contact me if you want to use this in a commercial project.
Credits Credit me (munkis) for the script. If you know who made the images, please let me know so I can give proper credit here.