sirsk8aton
Member
Trickster said:I will be waiting to see how much you improved your script![]()
It already is out, incase you didn't see it yet :P
Trickster said:I will be waiting to see how much you improved your script![]()
Trickster said:I've seen
Alot of code which could have been condensed into smaller lines of code.
case index
when 0
A = B[0]
return
when 1
A = B[1]
return
#and so on until when 15? Copy-pasting them would be boring...
end
A = B[index]
A = B[index + 1]
Start_Switch = {1 => 1, 2 => 3}
# ****** Put the ending switch id of each quest here.
End_Switch = {1 => 2, 2 => 4}
if @quests == 1
$cmd_window = Window_Command.new(160, [s1])
end
if @quests == 2
$cmd_window = Window_Command.new(160, [s1, s2])
end
if @quests == 3
$cmd_window = Window_Command.new(160, [s1, s2, s3])
end
if @quests == 4
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4])
end
if @quests == 5
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
end
if @quests == 6
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
end
if @quests == 7
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
end
if @quests == 8
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
end
if @quests == 9
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9])
end
if @quests == 10
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10])
end
if @quests == 11
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11])
end
if @quests == 12
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12])
end
if @quests == 13
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13])
end
if @quests == 14
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14])
end
if @quests == 15
$cmd_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15])
end
quest = [] # Preparing an empty array for storing commands
for i in 0...@quest # Looping in the number of quest
eval "quest.push(s#{i + 1})" # Adding commands to quest array
end
$cmd_window = Window_Command.new(160, quest)
End_Switch = {quest_id => switch_id, quest_id => switch_id, quest_id => switch_id ...}
well, that means you haven't define the '@quest' ^^@LegACy: Can I call an instance from a different scene though?
And when I tested your code, I get an error that says "Bad value for range"
on this line : for i in 0...@quest