Well, I have a little question about a Reduce of code (to make my script more shorter), I use arrays defined from a @case in a menucommand, this is the code.
I have maked a Module that contains the arrays called 'Profession', and the
Code:
# Branch by command window cursor position
case @command_window.index
when 0 # item
if $game_switches[Profession::Interruptores[0]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[0])
when 1
if $game_switches[Profession::Interruptores[1]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[1])
when 2
if $game_switches[Profession::Interruptores[2]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[2])
when 3
if $game_switches[Profession::Interruptores[3]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[3])
when 4
if $game_switches[Profession::Interruptores[4]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[4])
when 5
if $game_switches[Profession::Interruptores[5]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[5])
when 6
if $game_switches[Profession::Interruptores[6]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[6])
when 7
if $game_switches[Profession::Interruptores[7]] == false
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text(Profession::Desactivada , 1)
return
end
$game_system.se_play($data_system.decision_se)
@help_window.set_text(Profession::Description[7])
end
return
end
end
end
I have maked a Module that contains the arrays called 'Profession', and the