RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Resolved]Window_Skill Help

Started by blazinhandle, June 12, 2007, 04:49:01 AM

0 Members and 1 Guest are viewing this topic.

blazinhandle

Hey, I'm trying to fix my window_skill menu so that only skills of certain elements are drawn. I've tried this:

[Spoiler="Window_Skill Code"]  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
     
      for id in @actor.skills ###########
       
      if skill!= nil and $data_skills[id].element_set.include?(21) ##########
        @data.push(skill)
       
      end
       
      end
    end
    # If item count is not 0, make a bitmap and draw all items
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
[/Spoiler]

With inserting $data_skills[id].element_set.include?(X), and that works. However, I want it so that skills with EITHER elements 21-24 can be drawn. I tried doing if skill!= nil and $data_skills[id].element_set.include?(21) or $data_skills[id].element_set.include?(22) or $data_skills[id].element_set.include?(23) or $data_skills[id].element_set.include?(24) but that displayed the same skills mutliple times.

Any ideas on what I can do?