[ace] scene help

This is a custom scene and not a default one.

It lists the actors currently in the party when loaded up through a script call. However, how can I make it so that you can scroll through the list by using the up and down keys on the keyboard? Also when the scene is loaded I cannot exit it without shutting down the game completely. The B button does not register, does anyone know why?

Spoiler
Code:
class Window_ActorList < Window_Selectable    def initialize    super(0, 56, Graphics.width / 2, Graphics.height / 2)    refresh    self.index = 0  end   def refresh(main = -1, sub = -1)    self.contents.clear    @item_max = $game_party.members.size    for actor in $game_party.members      y = actor.index * line_height      if sub == -1        self.contents.font.color.alpha = main == actor.index ? 128 : 255      elsif sub > -1        self.contents.font.color.alpha = main == actor.index ? 128 : sub == actor.index ? 128 : 255      end      self.contents.draw_text(x, y, 108, line_height, actor.name)    end  endend#============================================================================#============================================================================class Scene_List < Scene_Base   def start    super    @background_sprite = Sprite.new    @background_sprite.bitmap = SceneManager.background_bitmap    @background_sprite.color.set(16, 16, 16, 128)        @actorlist = Window_ActorList.new    @index = @actorlist.index    @main = -1    @sub = -1    @counter = 0  end   def update    super    @background_sprite.update    @actorlist.update  end   def terminate    super    @background_sprite.dispose    @actorlist.dispose  end   def return_scene    $scene = Scene_Map.new  endend
You need to specifically say "If I press the B button, go back". It goes in the update method

if Input.trigger?🙂 SceneManager.returnendAlso, your return_scene method wouldn't work. Scenes are handled by the SceneManager. You're setting a global variable to a new instance of Scene_Map, but it just sits there.
Ah! Thank you! cant believe the exiting the scene part was something so simple. Now I can exit ^^, but when scene loads how come the the actor list is not selectable? I see the box around it but, it does not allow to move up and down.
oops, forgot about that part. At the end of the start method:

@actorlist.activateWindow_Selectable automatically deactivates the windows so that it doesn't matter what order you make them in, you will know which on is activated because you have to manually do it.
Alright so far I've added in the bits of snippets and ended up with this:

Spoiler
class Window_ActorList < Window_Selectable     def initialize    super(0, 56, Graphics.width / 2, Graphics.height / 2)    refresh    self.index = 0  end  def refresh(main = -1, sub = -1)    self.contents.clear    @item_max = $game_party.members.size    for actor in $game_party.members      y = actor.index * line_height      if sub == -1        self.contents.font.color.alpha = main == actor.index ? 128 : 255      elsif sub > -1        self.contents.font.color.alpha = main == actor.index ? 128 : sub == actor.index ? 128 : 255      end      self.contents.draw_text(x, y, 108, line_height, actor.name)    end  endend#============================================================================#============================================================================class Scene_Breed < Scene_Base   def start    super    @background_sprite = Sprite.new    @background_sprite.bitmap = SceneManager.background_bitmap    @background_sprite.color.set(16, 16, 16, 128)        @actorlist = Window_ActorList.new    @index = @actorlist.index    @main = -1    @sub = -1    @counter = 0    @actorlist.activate  end   def update    super    @background_sprite.update    @actorlist.update        if Input.trigger?🙂      SceneManager.return    end      end   def terminate    super    @background_sprite.dispose    @actorlist.dispose  end end 
Now, the actor list is "activated" but for some reason it is blinking abnormally faster as compared to the default menu, etc. Also do I need to include something in the update function for it to be able to scroll between the names of the actors?
Are the actors something you select, or is it just a menu that you see all the actors?
Actors are something you select.

Spoiler
jrxv5z.png
The scene loads the list of actors and then you select two.
You'll want to use Window_Command. It will let you make items selectable. To get the second actor, just remove put the selected on in a variable, remove them from the list, and select a second one. From there do whatever. You'll need to use the add_command and set_handler methods.
So basically, turn every character that would normally show up in the list into a command? and when you select that command process it and then so forth?
Yes, that's the easiest way to get it done.
It isn't the easiest way to do it as you need to register a handle for every actor.


An easier way is to just use a regular Window_Selectable and do basically what Window_ItemList or Window_SkillList do.


You also need to register ok and cancel handlers in the scene, which will do something based on the current selection.


The scene also should not have any variables related to what the window displays (eg: control is separate from the view)
Alright then, maybe not the easiest, but it's what I'd do.
heres the thing though, its a monster catching game and eventually you could have like 10-15 monsters so would it be better to use commands or the list as the other person suggested?

Original thread: https://forums.rpgmakerweb.com/threads/ace-scene-help.15198/