RPG Maker Forums

Hello everyone, i made a window wich will draw every character present in $data_actor in a somewhat choose your starting party system. So this window, it draws the actor characters until it reaches maximum height and then it don't scroll to show the other characters. Here are some screens of what is happening instead:



If you want to test it yourself, i made a example scene, just call SceneManager.call(Scene_PartySelect) and you'll see. here's my code:



Code:
class Window_CharList < Window_Selectable
  def initialize(x,y)
    super(x, y, 70, Graphics.height - y)
    @itens = []
    make_item_list
    select(0)
    activate
    refresh
  end
  def item_max
    @itens ? @itens.size : 1
  end
  def item
    @itens && index >= 0 ? @itens[index] : nil
  end
  def item_rect(index)
    rect = Rect.new
    rect.width = 38
    rect.height = 38
    rect.x = 4
    rect.y = index * rect.height
    rect
  end
  def make_item_list
    for i in 1...$data_actors.size
	  @itens[i - 1] = $game_actors[i]
    end
  end
  def draw_item(index)
    item = @itens[index]
    if item
	  rect = item_rect(index)
	  draw_actor_graphic(item, 22, rect.y + 36)
    end
  end
  def refresh
    contents.clear
    for i in 0...@itens.size
	  draw_item(i)
    end
  end
end

class Scene_PartySelect < Scene_MenuBase
  def start
    super
    create_all_windows
  end
  def create_all_windows
    @charlist_window = Window_CharLista.new(0,0)
    @charlist_window.set_handler(:cancel,    method(:return_scene))
  end
end
I don't know how to fix it, and neither if i was clear enough with my bad english, but if someone could fix it and/or tell me what i did wrong i'll be glad. Thanks in advice.

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,090
Members
137,587
Latest member
Usagiis
Top