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
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[MAINICHI_YAKINIKU_TABETAI]
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[i] = Sprite.new
@saara_stwar_sprites[i].x = Graphics.width / 2
@saara_stwar_sprites[i].y = Graphics.height - saara_stwar_height + i
@saara_stwar_sprites[i].ox = contents_width / 2
sz = Saara_Sugee::OKUYUKI * i.to_f / saara_stwar_height
@saara_stwar_sprites[i].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[saara_stwar_height-1] - 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[i] + @scroll_pos).round
@saara_stwar_sprites[i].src_rect.set(0, sy, contents.width, 1)
@saara_stwar_sprites[i].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/