Advertisement
Dekita

SsS

Dec 24th, 2012
1,003
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.0
  3. ★ Simple Splash Screen™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. This script simply allows ONE splash screen to be displayed before the title
  9. scene.
  10.  
  11. ================================================================================
  12. ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  13. ================================================================================
  14. 1. You must give credit to "Dekita"
  15. 2. You are NOT allowed to repost this script.(or modified versions)
  16. 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  17. 4. You are NOT allowed to use this script for Commercial games.
  18. 5. ENJOY!
  19.  
  20. "FINE PRINT"
  21. By using this script you hereby agree to the above terms and conditions,
  22. if any violation of the above terms occurs "legal action" may be taken.
  23. Not understanding the above terms and conditions does NOT mean that
  24. they do not apply to you.
  25. If you wish to discuss the terms and conditions in further detail you can
  26. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  27.  
  28. ================================================================================
  29. History:
  30. =========
  31. D /M /Y
  32. 14/12/2o12 - started and finished,
  33.  
  34. ================================================================================
  35. Known Bugs:
  36. ============
  37. N/A
  38.  
  39. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  40. If a new bug is found please contact me at
  41. http://dekitarpg.wordpress.com/
  42.  
  43. ================================================================================
  44. INSTRUCTIONS:
  45. ==============
  46. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  47. Place the image you want to use for your splash screen inside the
  48. "Graphics/System/" folder and rename Splash_Name (below) to your image name.
  49.  
  50. =end #==========================================================================#
  51.  
  52. module Dekita_SPLASH
  53.  
  54. Use_Splash_Screen = true # << self explanitory.
  55.  
  56. Splash_Name = "D-RPG" # Name of the file in the "Graphics/System/" folder.
  57.  
  58. Splash_Location = [120, 180] # [ x , y ]
  59.  
  60. Splash_Zoom = [0.50, 0.40] # [ width , height ]
  61.  
  62. #Splash_Tone= [Use?, red, green, blue, grey ]
  63. Splash_Tone = [true, 100, 0, 0, 0]
  64.  
  65. Skip_Button = :C # Button to skip the splash screen before it finishes.
  66.  
  67. Duration = 180 # The time the splash screen lasts after its fully visible.
  68.  
  69. Fade_Duration = 60 # The fadeout duration.
  70.  
  71. end
  72.  
  73. $imported = {} if $imported.nil?
  74. $imported[:Dekita_Simple_Splash_Screen] = true
  75.  
  76. #==============================================================================
  77. module SceneManager
  78. #==============================================================================
  79.  
  80. class << self ; alias first_scene_class_SPLASH first_scene_class ; end
  81.  
  82. def self.first_scene_class
  83. return first_scene_class_SPLASH if !Dekita_SPLASH::Use_Splash_Screen
  84. $BTEST ? Scene_Battle : Scene_SPLASH
  85. end
  86.  
  87. end
  88.  
  89. #==============================================================================
  90. class Scene_SPLASH < Scene_Base
  91. #==============================================================================
  92.  
  93. include Dekita_SPLASH
  94.  
  95. def initialize
  96. create_splash
  97. @splash_timer = 0
  98. end
  99.  
  100. def create_splash
  101. st = Splash_Tone
  102. @splash = Sprite.new
  103. if $imported[:Dekita_Pokémon_Title_DO_NOT_USE]
  104. @splash.bitmap = Cache.poketitle(Splash_Name)
  105. else
  106. @splash.bitmap = Cache.system(Splash_Name)
  107. end
  108. @splash.opacity = 0
  109. @splash.z = 201
  110. @splash.zoom_x = Splash_Zoom[0]
  111. @splash.zoom_y = Splash_Zoom[1]
  112. @splash.x = Splash_Location[0]
  113. @splash.y = Splash_Location[1]
  114. @splash.tone = Tone.new(st[1], st[2], st[3], st[4]) if st[0]
  115. end
  116.  
  117. def terminate
  118. super
  119. @splash.bitmap.dispose
  120. @splash.dispose
  121. end
  122.  
  123. def update
  124. super
  125. @splash.opacity += 1
  126. goto_title if Input.press?(Skip_Button)
  127. if @splash.opacity >= 255
  128. @splash_timer += 1
  129. goto_title if @splash_timer >= Duration
  130. end
  131. end
  132.  
  133. def goto_title
  134. Graphics.fadeout(Fade_Duration)
  135. SceneManager.goto(Scene_Title)
  136. end
  137.  
  138. end
  139.  
  140. #===============================================================================#
  141. # - SCRIPT END - #
  142. #===============================================================================#
  143. # http://dekitarpg.wordpress.com/ #
  144. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement