じ☆ve冰风 发表于 2026-8-2 16:28:32

Opening Crawl (scrolling text)

https://www.youtube.com/embed/8ceLtV7EQ00


Star Wars style scrolling text

Creator name: Saara

Terms of Use
Non-commercial use: OK
Commercial use: you may feel free if you're careful
Redistribution: credit required
Processing: OK
Redistribution after processing: credit required
For RPG Maker VX Ace

Script set up
In Customization-
Switch id = 11
If Switch 11 is ON, script activates when you use "show scrolling text" event

Preview

https://i.imgur.com/iAcve8W.png


Be sure to prepare your own picture for the background with event "show picture"

How to Use
Paste this script above Main.

Script
                Ruby:       
#===============================================================================
#
# ☆ Star Wars style scrolling text! by Saara
#
#-------------------------------------------------------------------------------
# You can have a cinematic opening/ ending text!!
#-------------------------------------------------------------------------------
# ● How to use
#
#Read on for the customization!
#
#===============================================================================

module Saara_Sugee

#--☆★Customization★☆-----------------------------------------

# Switch number to turn on the function
# While the switch for number specified is on
# A movie styled texts feature is turned on.
# Turn switch ON and use "show scrolling text" event
MAINICHI_YAKINIKU_TABETAI = 11

# Text depth
OKUYUKI = 3.3

# Scroll speed multiplier
SCROLL_SPEED = 0.5

#--☆★End customization★☆-----------------------------------------

def self.stwar_switch
    $game_switches
end
end

#==============================================================================
# ■ Window_ScrollText
#------------------------------------------------------------------------------
#  Window used for the scrolling text.
#==============================================================================

class Window_ScrollText
#--------------------------------------------------------------------------
# ● Initialize
#--------------------------------------------------------------------------
alias saara_stwar_initialize initialize
def initialize
    saara_stwar_initialize
    saara_create_stwar
end
#--------------------------------------------------------------------------
# ● Scroll speed
#--------------------------------------------------------------------------
alias saara_stwar_scroll_speed scroll_speed
def scroll_speed
    saara_stwar_scroll_speed * (@strwar ? Saara_Sugee::SCROLL_SPEED : 1)
end
#--------------------------------------------------------------------------
# ● Height
#--------------------------------------------------------------------------
def saara_stwar_height
    return ((Graphics.height+1)/2)
end
#--------------------------------------------------------------------------
# ● Create
#--------------------------------------------------------------------------
def saara_create_stwar
    @saara_stwar_sprites = []
    saara_stwar_height.times do |i|
      @saara_stwar_sprites = Sprite.new
      @saara_stwar_sprites.x = Graphics.width / 2
      @saara_stwar_sprites.y = Graphics.height - saara_stwar_height + i
      @saara_stwar_sprites.ox = contents_width / 2
      sz = Saara_Sugee::OKUYUKI * i.to_f / saara_stwar_height
      @saara_stwar_sprites.zoom_x = sz
    end
end
#--------------------------------------------------------------------------
# ● Start message
#--------------------------------------------------------------------------
alias saara_start_message start_message
def start_message
    saara_start_message
    @strwar = Saara_Sugee.stwar_switch
    @saara_stwar_sprites.each {|s| s.bitmap = contents}
    @scroll_pos = -saara_stwar_zoom_to_y - 8 if @strwar
end
#--------------------------------------------------------------------------
# ● Message update
#--------------------------------------------------------------------------
alias saara_stwar_update_message update_message
def update_message
    saara_stwar_update_message
    self.contents_opacity = (@strwar ? 0 : 255)
    saara_update_stwar if @saara_stwar_sprites
end
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
def saara_update_stwar
    smax = @saara_stwar_sprites.size
    @saara_stwar_sprites.each_index do |i|
      sy = (saara_stwar_zoom_to_y + @scroll_pos).round
      @saara_stwar_sprites.src_rect.set(0, sy, contents.width, 1)
      @saara_stwar_sprites.visible = @strwar
    end
end
#--------------------------------------------------------------------------
# ● Angle
#--------------------------------------------------------------------------
def saara_stwar_zoom_to_y
    unless @saara_stwar_zoom_to_y
      @saara_stwar_zoom_to_y = []
      i = 0
      iy = 0
      until i > saara_stwar_height
      if i == 0
          sz = 0
      else
          r = Saara_Sugee::OKUYUKI * i.to_f / saara_stwar_height
          sz = 1 / r
      end
      @saara_stwar_zoom_to_y.push iy
      i += 1
      iy += sz
      end
    end
    return @saara_stwar_zoom_to_y
end
#--------------------------------------------------------------------------
# ● Clear
#--------------------------------------------------------------------------
alias saara_dispose dispose
def dispose
    saara_dispose
    @saara_stwar_sprites.each do |sprite|
      sprite.dispose
    end
end
end



Credit and Thanks: Saara

Terms of Use- Free for commercial (careful) and non-commercial use with credit of "Saara"

Source
https://forum.tkool.jp/index.php?threads/vxaceスクリプト素材-某星戦争風のテロップ表示!.831/


本贴来自国际rpgmaker官方论坛作者:ovate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/opening-crawl-scrolling-text.130799/
页: [1]
查看完整版本: Opening Crawl (scrolling text)