Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Another Scrolling Text Script
#1
This is my version of the scrolling text script, it's supposed to be used whenever you want to show the credits, to display an intro that may include a prologue and some picture above... or you just want to create an intro every time a new episode / chapter begins in your game.

Features:

If you press Cancel button or there is no more lines to be displayed, it will be closed automatically.

Instructions:

In a script call enter this line
$scene = Scroll.new(1) or $scene = Scroll.new(1, 1)

Do you need to change the text? No problem. Just go to Text module and edit the Intro or Chapter_1 lines I enter as an example.

Note:

This is a Scrolling Window Script actually he he he he

Code:
module Text
  Intro = {
      100 => 'Sentence 1',
      101 => 'this does not mean anything',
      102 => 'Sentence 3',
      103 => 'Sentence 4',
      104 => 'Sentence 5',
      105 => '',
      106 => 'Sentence 6',
      107 => 'Sentence 7',
      108 => 'Sentence 8',
      109 => 'Sentence 9',
      110 => 'just another line of text',
      111 => 'Sentence 11',
      112 => "I don't know what I'm doing here",
      113 => '',
      114 => 'New Paragraph: Make up something else',
      115 => 'The Last Sentence'
      }

  Chapter_1 = {
      100 => 'Sentence 1',
      101 => 'this does not mean anything',
      102 => 'Sentence 3',
      103 => 'Sentence 4',
      104 => 'Sentence 5',
      105 => '',
      106 => 'Sentence 6',
      107 => 'Sentence 7',
      108 => 'Sentence 8',
      109 => 'Sentence 9',
      110 => 'just another line of text',
      111 => 'Sentence 11',
      112 => "I don't know what I'm doing here",
      113 => '',
      114 => 'New Paragraph: Make up something else',
      115 => 'The Last Sentence'    
      }
end
#=====================================================
#  *  Scrolling Text v 1.0
#     by shadowball
#     01.14.2008
#=====================================================
class Scrolling_Text < Window_Base
  def initialize(index)
    @index = index
    super(0, 0, 440, 636)
    self.contents = Bitmap.new(width - 32, height - 32)
    case index
    when 0
      @text = Text::Intro
    when 1
      self.contents.font.color = gold_color
      @text = Text::Chapter_1
    end
    y = -32
    @text.sort.each do |keys, values|
      y += 32
      self.contents.draw_text(0,y,488,32, values)
    end
    self.opacity = 0
    refresh
  end
  
  def refresh
    self.y -= 1 if self.y > -544
  end
  
end
Code:
#=====================================================
#  *  Scroll (Scene) v 1.0
#     by shadowball
#     01.14.2008
#=====================================================
class Scroll
  
  def initialize(index = 0, pic = 0)
    @index = index
    @pic = pic
  end
  
  def main
    @sprite1 = Sprite.new
    @sprite1.bitmap = RPG::Cache.picture('this is a wall paper')
    @sprite2 = Sprite.new
    if @pic == 1
      @sprite2.bitmap = RPG::Cache.picture('any image')
      @sprite2.z = 250
    end
    if @index == 0
      @shb_scroll_window = Scrolling_Text.new(0)
    elsif @index == 1
      @shb_scroll_window = Scrolling_Text.new(1)
    end
    @shb_scroll_window.x = 100
    @shb_scroll_window.y = 480
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @shb_scroll_window.dispose
    @sprite1.dispose
    @sprite1.bitmap.dispose
    if @pic == 1
      @sprite2.dispose
      @sprite2.bitmap.dispose
    end
  end

  def update
    # Update windows
    @shb_scroll_window.refresh
    if @pic == 0
      if @shb_scroll_window.y == -636
        $scene = Scene_Map.new
      elsif Input.trigger?(Input::B)
        $game_system.se_play($data_system.cancel_se)
        $scene = Scene_Map.new
      end
    elsif @pic == 1
      if @shb_scroll_window.y == -360
        $scene = Scene_Map.new
      elsif Input.trigger?(Input::B)
        $game_system.se_play($data_system.cancel_se)
        $scene = Scene_Map.new
      end
    end
  end
end

# This would allow you to use it just after you start a new game
class Scene_Title
  def command_new_game
    # Play decision SE
    $game_system.se_play($data_system.decision_se)
    # Stop BGM
    Audio.bgm_stop
    # Reset frame count for measuring play time
    Graphics.frame_count = 0
    # Make each type of game object
    $game_temp          = Game_Temp.new
    $game_system        = Game_System.new
    $game_switches      = Game_Switches.new
    $game_variables     = Game_Variables.new
    $game_self_switches = Game_SelfSwitches.new
    $game_screen        = Game_Screen.new
    $game_actors        = Game_Actors.new
    $game_party         = Game_Party.new
    $game_troop         = Game_Troop.new
    $game_map           = Game_Map.new
    $game_player        = Game_Player.new
    # Set up initial party
    $game_party.setup_starting_members
    # Set up initial map position
    $game_map.setup($data_system.start_map_id)
    # Move player to initial position
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    # Refresh player
    $game_player.refresh
    # Run automatic change for BGM and BGS set with map
    $game_map.autoplay
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scroll.new
  end
end
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }
#2
Does anyone know how I get the words to scroll slower?

This goes RAPID across my screen. Works just fine otherwise but.....is there maybe a way to delay the beginning from playing (to allow the user to see the background picture for a few moments), slow down the words (so we can actually read them, yikes), and perhaps sit and wait on the last paragraph (or line of text) until the user hit 'ENTER' or any key...?

That would make it seem more like an intro, in my opinion.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   Text Scroll Script - Enhanced DerVVulfman 23 29,739 02-18-2021, 04:16 AM
Last Post: DerVVulfman
   Cursor Script Selwyn 7 13,108 09-28-2019, 02:13 PM
Last Post: DerVVulfman
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 3,945 08-09-2019, 03:42 PM
Last Post: aeliath
   ACBS FIX SCRIPT #1: Victory Cries Patch DerVVulfman 1 3,922 08-08-2019, 02:53 PM
Last Post: aeliath
   Archived Script Listings DerVVulfman 9 33,694 01-08-2019, 04:27 AM
Last Post: DerVVulfman
   Spritesheet Generator Conversion Script DerVVulfman 0 3,601 11-21-2018, 04:48 AM
Last Post: DerVVulfman
   Neo Mode 7 Script by MGCaladtogel MGC 59 111,450 09-29-2017, 03:48 AM
Last Post: DerVVulfman
   Longer Script Calls LiTTleDRAgo 0 4,364 05-17-2017, 12:36 AM
Last Post: LiTTleDRAgo
   SLOLS: Snake Look-alike on Load Script Zeriab 3 10,179 05-14-2017, 06:25 PM
Last Post: LiTTleDRAgo
   Character Select Script Selwyn 3 9,510 03-07-2017, 04:14 AM
Last Post: JayRay



Users browsing this thread: