- Joined
- Jun 22, 2013
- Messages
- 26
- Reaction score
- 0
- First Language
- English
- Primarily Uses
- N/A
Hi,
I'm having problems transitioning to another screen. What I want to accomplish is that all of the options call another screen (Scene_Fusion2). But I also want to get Scene_Fusion2 to display what you have selected from the previous screen (Scene_Fusion1).
Additionally, I am not able to exclude the main actor (the very first actor) no matter what method I try.
For ease, I was thinking of separating each screen (Scene_Fusion1 and Scene_Fusion2) into two separate screens... but I'm willing to follow suggestions.
I'm having problems transitioning to another screen. What I want to accomplish is that all of the options call another screen (Scene_Fusion2). But I also want to get Scene_Fusion2 to display what you have selected from the previous screen (Scene_Fusion1).
Additionally, I am not able to exclude the main actor (the very first actor) no matter what method I try.
For ease, I was thinking of separating each screen (Scene_Fusion1 and Scene_Fusion2) into two separate screens... but I'm willing to follow suggestions.
Code:
#==============================================================================# Class Scene_Fusion < Scene_MenuBase# This class is for displaying the first Fusion screen. All options should# open the next screen, Scene_Fusion2#==============================================================================class Scene_Fusion < Scene_MenuBase def start super @header_window = Window_Header.new(0, 0, Graphics.width, 50) @list_window = Window_PartyList.new(0, 50, Graphics.width) @list_window.set_handler(:cancel, method(:return_scene)) end #def startend #class Scene_Fusion#==============================================================================# Class Scene_Fusion2 < Scene_MenuBase# This class is for displaying the second Fusion screen. All options should# open the next screen, displaying the status of the resulting demon#==============================================================================class Scene_Fusion2 < Scene_MenuBase def start super @header_window2 = Window_Header2.new(0, 0, Graphics.width, 50) @list_window2 = Window_PartyList2.new(0, 50, Graphics.width) @list_window2.set_handler(:cancel, method(:return_scene)) end #def startend #class Scene_Fusion2#==============================================================================# Class Window_Header < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header < Window_Base def initialize(x, y, width, height) super self.windowskin = Cache.system("Window") self.opacity = 0 update_padding update_tone create_contents draw_headers @opening = @closing = false end #def initialize def dispose contents.dispose unless disposed? super end #def dispose def draw_headers change_color(system_color) draw_text(25, 0, 250, line_height, "Select First Demon") draw_text(25, 25, 85, line_height, "Race") draw_text(110, 25, 85, line_height, "Name") draw_text(190, 25, 85, line_height, "LV") for i in 1..6 eval("draw_text(220+(50*#{i}), 0, 30, line_height, #{i})") end # for change_color(normal_color) end #def draw_headersend #class Window_Header#==============================================================================# Class Window_Header2 < Window_Base# This class displays the options at the top.#==============================================================================class Window_Header2 < Window_Base def initialize(x, y, width, height) super self.windowskin = Cache.system("Window") self.opacity = 0 update_padding update_tone create_contents draw_headers @opening = @closing = false end #def initialize def dispose contents.dispose unless disposed? super end #def dispose def draw_headers change_color(system_color) draw_text(25, 0, 250, line_height, "Select Second Demon") draw_text(25, 25, 85, line_height, "Race") draw_text(110, 25, 85, line_height, "Name") draw_text(190, 25, 85, line_height, "LV") draw_text(300, 25, 85, line_height, "Result") change_color(normal_color) end #def draw_headersend #class Window_Header2#==============================================================================# Class Window_PartyList < Window_Selectable# This class displays the list of party members. Should not include the# main actor. #==============================================================================class Window_PartyList < Window_Selectable def initialize(x, y, width) super(x, y, width, Graphics.height - y) self.opacity = 0 data = [] self.index = 0 #Do not include the main actor! activate refresh end #def initialize def item_max @data ? @data.size : 1 end #def item_max def make_item_list @data = $game_party.members.compact end #def make_item_list def draw_item(index) item = @data[index] if item rect = item_rect_for_text(index) draw_text(rect, item.id) draw_text_ex(rect.x + 15, rect.y, item.class.name) draw_text_ex(rect.x + 100, rect.y, item.name) draw_text_ex(rect.x + 180, rect.y, item.level) for i in 1..6 if index==i-1 #If same actor, cannot be fused eval("draw_text(220+(50*#{i}), rect.y, 30, line_height, '-')") elsif item.class == @data[i-1].class #else if same class, cannot be fused eval("draw_text(220+(50*#{i}), rect.y, 30, line_height, 'No')") else #else, can be fused eval("draw_text(220+(50*#{i}), rect.y, 30, line_height, 'Yes')") #@data[i-1].set_handler(:ok, SceneManager.call(Scene_Fusion2)) #set call handler end #end if else end #end for end #end if end #def draw_item def refresh contents.clear make_item_list create_contents draw_all_items end #def refresh #set handler for showing the next screenend #class Window_PartyList#==============================================================================# Class Window_PartyList2 < Window_Selectable# This class displays the list of party members. Should not include the# main actor. #==============================================================================class Window_PartyList2 < Window_Selectable def initialize(x, y, width) super(x, y, width, Graphics.height - y) self.opacity = 0 data = [] self.index = 0 #Do not include the main actor! activate refresh end #def initialize def item_max @data ? @data.size : 1 end #def item_max def make_item_list @data = $game_party.members.compact end #def make_item_list def draw_item(index) item = @data[index] if item rect = item_rect_for_text(index) draw_text(rect, item.id) draw_text_ex(rect.x + 15, rect.y, item.class.name) draw_text_ex(rect.x + 100, rect.y, item.name) draw_text_ex(rect.x + 180, rect.y, item.level) #Compute the resulting demon show_result(item, @data) end #end if end #def draw_item #should print out the resulting demon. def show_result(item, data) #some code here end #show_result def refresh contents.clear make_item_list create_contents draw_all_items end #def refresh #set handler for showing the next screenend #class Window_PartyList2


