Save-Point
KuickSplasher XP - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: KuickSplasher XP (/thread-8711.html)



KuickSplasher XP - kyonides - 03-16-2023

KuickSplasher XP

by Kyonides


Introduction

You know what a splash screen is so feel free to use my script to get some pictures displayed on screen! Grinning

There are 3 CONSTANTS that you can edit to adjust either the time the transition will last or how long the image will be on screen. You can also add as many pictures as you need, if you know how an Array object works in Ruby. Happy with a sweat

I just made this script because someone showed up asking for a simple splash screen script. Tongue sticking out

Code:
# * KuickSplasher XP * #
#   Scripter : Kyonides Arkanthes
#   v0.5.0 - 2023-03-16

# * Free as in beer * #

# After including this script in the Script Editor, go to the Main script and
# replace Scene_Title.new with KuickSplasher.new and save everything!

class KuickSplasher
  TRANSITION_SECONDS = 2 # It gotta be a low value
  DISPLAY_SECONDS = 10
  # PICTURES = ["Include", "as", "many", "pictures", "as", "needed"]
  PICTURES = ["backdrop circles blue", "mysterious coast"]
  def change_picture
    Graphics.freeze
    return if @images.empty?
    @backdrop.bitmap.dispose
    @backdrop.bitmap = RPG::Cache.title(@images.shift)
    @timer = Graphics.frame_rate * DISPLAY_SECONDS
    Graphics.transition(Graphics.frame_rate * TRANSITION_SECONDS)
  end

  def main
    $data_system = load_data("Data/System.rxdata")
    $game_system = Game_System.new
    @images = PICTURES.dup
    @backdrop = Sprite.new
    @backdrop.bitmap = Bitmap.new(32, 32)
    change_picture
    while @timer > 0
      Graphics.update
      Input.update
      update
      @timer -= 1
      change_picture if @timer == 0
    end
    $scene = Scene_Title.new
    @backdrop.bitmap.dispose
    @backdrop.dispose
  end

  def update
    if Input.trigger?(Input::B) or Input.trigger?(Input::C)
      $game_system.se_play($data_system.cancel_se)
      @timer = 1
    end
  end
end


Terms & Conditions

Free as in Beer beer.
Do not repost it! Angry
Credits are optional here. Thinking