daily pastebin goal
19%
SHARE
TWEET

Simple Title Animation - RGSS3/RMVXA

CompanionWulf Jul 18th, 2015 235 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #==============================================================================
  2. # Simple Title Animation RMVXA v1.0
  3. # © 2012, Companion Wulf
  4. #    RPG Maker Times - http://rpgmakertimes.co.cc/blog
  5. #
  6. # Feel free to propagate this script, but please give credit.
  7. #==============================================================================
  8. # This script manipulates the title (defined in the Database) and animates it,
  9. # from the top of the screen to the centre of the screen above the menu.
  10. #
  11. #==============================================================================
  12. # Version History
  13. #==============================================================================
  14. # 27-Mar-2012 - Version 1.0
  15. #   * Began/finished script
  16. #
  17. #==============================================================================
  18. # Begin Editable Options
  19. #==============================================================================
  20. SPRITE_Y = -160                     # Y starting position of title
  21. SPRITE_Z = 100                      # Z index of title
  22. SPRITE_SPEED = 1                    # Speed the title moves down screen
  23. SPRITE_END_YPOS = 150               # Where the title ends up (Y coordinate)
  24. SPRITE_FONT = "SF Gushing Meadow"   # Title font
  25. FONT_COLOR = Color.new(200,0,0)     # Title font colour
  26. #==============================================================================
  27. # End Editable Options
  28. #==============================================================================
  29.  
  30.  
  31.  
  32. #==============================================================================
  33. # Do not edit below unless you're a scripter.
  34. #==============================================================================
  35.  
  36. #==============================================================================
  37. # ¦ Scene_Base
  38. #------------------------------------------------------------------------------
  39. # Aliased method: update
  40. #==============================================================================
  41. class Scene_Base
  42.   #--------------------------------------------------------------------------
  43.   # ? Update
  44.   #--------------------------------------------------------------------------
  45.   alias cwscnbs_update update
  46.   def update
  47.     cwscnbs_update
  48.     update_title_anim if @from_title
  49.   end
  50. end
  51.  
  52.  
  53. #==============================================================================
  54. # ¦ Scene_Title
  55. #------------------------------------------------------------------------------
  56. # Aliased method: start
  57. # Overwritten method: create_foreground
  58. # New methods: update_title_anim
  59. #==============================================================================
  60. class Scene_Title < Scene_Base
  61.   #--------------------------------------------------------------------------
  62.   # ? Start Processing
  63.   #--------------------------------------------------------------------------
  64.   alias cwscnttl_start start
  65.   def start
  66.     cwscnttl_start
  67.     @from_title = true
  68.   end
  69.   #--------------------------------------------------------------------------
  70.   # ? Create Foreground
  71.   #--------------------------------------------------------------------------
  72.   def create_foreground
  73.     @foreground_sprite = Sprite.new
  74.     @foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
  75.     @foreground_sprite.bitmap.font.color = FONT_COLOR
  76.     @foreground_sprite.bitmap.font.name = SPRITE_FONT
  77.     @foreground_sprite.y = SPRITE_Y #-160
  78.     @foreground_sprite.z = SPRITE_Z #100
  79.     draw_game_title if $data_system.opt_draw_title
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ? Update Title Animation
  83.   #--------------------------------------------------------------------------
  84.   def update_title_anim
  85.     @foreground_sprite.y += SPRITE_SPEED unless @foreground_sprite.y == SPRITE_END_YPOS #130
  86.   end
  87. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top