Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Munkis' Animated Menu Background
munkis
post Jan 6 2011, 07:32 PM
Post #1


Woah, dude...
Group Icon

Group: Revolutionary
Posts: 197
Type: Writer
RM Skill: Intermediate




Munkis' Animated Menu Background

Version: 1.2
Author:
Release Date: 01/06/2011


Exclusive Script at RPG RPG Revolution


Introduction
Okay, I've animated the Game Over screen, the title screen, and now the menu background. What next laugh.gif

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.
  
  ANIMATION_PROPERTIES = ["Background","Foreground",0,0,1,-1,255,99]

end

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.


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 06:35 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker