Ho modificato il menu originale togliendo le finestre dei soldi, del tempo e dei passi, perchè vorrei metterli in un nuovo comando nel menu chiamato: "Statistiche".
Però mi da errore nella stringa 14 del "main" (che io non ho modificato).
Vi posto lo script del menu e delle statistiche. :smile:
Question
raXor
Ho modificato il menu originale togliendo le finestre dei soldi, del tempo e dei passi, perchè vorrei metterli in un nuovo comando nel menu chiamato: "Statistiche".
Però mi da errore nella stringa 14 del "main" (che io non ho modificato).
Vi posto lo script del menu e delle statistiche. :smile:
Script: "Scene_Menu"
#====================================================
#SCRIPT MENU
#====================================================
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Stato"
s5 = "Salva"
s6 = "Esci"
s7 = "Statistiche"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s7, s5, s6])
@command_window.index = @menu_index
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@status_window.dispose
end
def update
@command_window.update
@status_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 5
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 6
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
when 4
$game_system.se_play($data_system.decision_se)
$scene = Scene_Statistiche.new
end
return
end
end
def update_status
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 1
if $game_party.actors[@status_window.index].restriction >= 2
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Skill.new(@status_window.index)
when 2
$game_system.se_play($data_system.decision_se)
$scene = Scene_Equip.new(@status_window.index)
when 3
$game_system.se_play($data_system.decision_se)
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
E questo è lo script: "Scene_Statistiche"
#=====================================================
#SCENE STATISTICHE
#-----------------------------------------------------
#E' un comando ke dovrà essere applicato
#al menu e fa comparire le finestre:
# - Window_PlayTime
# - Window_Steps
# - Window_Gold
#Utile x ki vuole + spazio x i suoi comandi...xD
#=====================================================
class Scene_Statistiche
def main
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
$scene = Window_PlayTime.new
$scene = Window_Steps.new
$scene = Window_Gold.new
end
def update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu
return
end
end
end
Il menu funziona, ma quando vado su Statistiche mi da errore alla stringa 14 del main
(Le grandezze delle 3 finestre le setto io)... almeno qualcosa so farla...xD :rovatfl:
Aiutatemi Please... o almeno ditemi dove ho sbagliato, così provo a farlo io... Almeno imparo qualcosa di più...xD :Ok:
Edited by raXorLink to comment
Share on other sites
6 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now