I am very new to scripting, and this is my very first attempt at ruby scripting. I am trying to make a script that shows a image
saying "Press the space bar" Just like "Press Start" from other games. I know this is my first post, and I haven't been a member for very long, but I hope you other members can help me.
Using this script I get an error with main on line 17 $scene.main
Thanks!
~Wingish
saying "Press the space bar" Just like "Press Start" from other games. I know this is my first post, and I haven't been a member for very long, but I hope you other members can help me.
Code:
#------------------------------------------------------------------------
# Press Space
# By Wingish
# Press Space to enter the title screen
#------------------------------------------------------------------------
class Scene_Space
# Load the System database & create a new game
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
# Initialize some stuff
@show = true
@n = 0
@picture_numb = 1
# Define info about the image
@sprite1 = Sprite.new
@sprite1.bitmap = RPG::Cache.picture("Press-Space")
@sprite1.opacity = 0
# If SPACEBAR is pressed the player is sent to the title screen
if Input.trigger?(Input::C)
@show = false
@n = 0
@picture_numb -= 1
end
# Makes Press-Space visable
if @show == true
@n = 255
# Chooses the action required at the time
case @picture_numb
when 0
$scene = Scene_Title.new
when 1
@sprite1.opacity = @n
end
end
end
Using this script I get an error with main on line 17 $scene.main
Thanks!
~Wingish