Syndicate content

starting up some scripting

3 posts / 0 new
Last post
Offline
Super TownieGreat TownieTownie
Joined: 23 May 2010
starting up some scripting

however i am trying:)
EDIT: That made no sense sorry lol... im just asking to fix this syntax errors and let me know how you did

Spoiler: Highlight to view
this is the start script one
#CONFIG

PLACEMENT = ([230, 250])
# X Y

BACKGROUND_IMAGE = "test"

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs menu screen processing.
#==============================================================================

class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = "Continue"
s2 = "Items"
s3 = "End"
s4 = "Options"
@command_window = Window_Command.new(160, [s1, s2, s3, s4])
@command_window.index = @menu_index
@command_window.x = PLACEMENT[0]
@command_window.y = PLACEMENT[1]
@back_sprite = Sprite.new(Viewport.new(0,0,640,480))
picname = BACKGROUND_IMAGE
@back_sprite.bitmap = RPG::Cache.picture(picname)
# Make map background
@background = "test"
# 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
@back_sprite.dispose
@command_window.dispose
#@background.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@back_sprite.update
@command_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # resume
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
when 1 # items
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_Item.new
when 2 # end game
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to end game screen
$scene = Scene_End.new
when 3 # options
# Play decision SE
@game_system.se_play($data_system.decision_se)
# Switch to options menu
$scene = Scene_Options.new
end
return
end
end
end 
Spoiler: Highlight to view
basically idk what im doing wrong here this is the options one
#CONFIG

PLACEMENT = ([230, 250])
# X Y

BACKGROUND_IMAGE = "test"

#==============================================================================
# ** Scene_Options
#------------------------------------------------------------------------------
# This class performs options screen processing.
#==============================================================================

class Scene_Options
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = "Go Back"
s2 = "Cheats"
s3 = "Credits"
@command_window = Window_Command.new(160, [s1, s2, s3])
@command_window.index = @menu_index
@command_window.x = PLACEMENT[0]
@command_window.y = PLACEMENT[1]
@back_sprite = Sprite.new(Viewport.new(0,0,640,480))
picname = BACKGROUND_IMAGE
@back_sprite.bitmap = RPG::Cache.picture(picname)
# Make map background
@background = "test"
# 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
@back_sprite.dispose
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@back_sprite.update
@command_window.update
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to start screen
$scene = Scene_Menu.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @command_window.index
when 0 # go back
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to start screen
$scene = Scene_Menu.new
when 1 # cheats
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to cheats menu
$scene = Scene_Cheats.new
when 2 # credits
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to credits screen
$scene = Scene_Credits.new
end
return
end
end
end 

KILLS: 10-----CRITICAL: 1-----DEATHS: 0

Offline
Mega TownieSuper TownieGreat TownieTownie
Joined: 15 Jan 2010

I have no idea why, because both of these are exactly the same, but copy this $game_system.se_play($data_system.decision_se)
and past it over line 91 and it'll work o.O

Oh, and, YOU CHEATER!!! Angry
jks Sticking Out Tongue

EDIT:
Ahh, I just relised something...
There's no equipment menu!?!

Offline
Super TownieGreat TownieTownie
Joined: 23 May 2010

nope no equipment menu

in the game there is no armor or weopons, just items and fists
and thanks

EDIT: it was actually line 98 on the start script... it had a @ instead of $

KILLS: 10-----CRITICAL: 1-----DEATHS: 0

Topic locked

Who's online

There is currently 1 user and 1 guest online.

Online users