You can't use Window_Message, the window used to display text in the game.
It uses variables which will be defined only later, when the game starts.
make your own simple window, something like:
[rgss]class Mywindow < Window_Selectable
def initialize
super(80, 304, 480, 160)
self.contents = Bitmap.new(width - 32, height - 32)
end
def show(text)
@text = text
end
def update
self.contents.clear
self.contents.draw_text(x, y, width, height, @text, align)
# if you wish to mimic the default message :
# self.contents.draw_text(0, 32* line, width, 32, @text, 0)
end
end
[/rgss]
Your scene should create and update the window. Its update method should check if Enter was pressed, and if so show the next message.
[rgss]class Scene_Intro
def main
@message_window = Mywindow.new
# show title picture
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
# you probably want to store all the text in an array.
@array = [ "message", "second message" ..]
@i = 0
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
@message_window.dispose
@sprite.bitmap.dispose
@sprite.dispose
end
def update
# if player hits Enter, Space or X
if Input.trigger?(Input::C)
@i += 1
# if done showing all messages
if (@i == @array.size)
# exit this scene and go to title screen
$scene = Scene_Title.new
else
next_message = @array[@i]
@message_window.show(next_message)
end
end
@message_window.update
end
end
[/rgss]