RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Resolved]Window_Skill Help

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
Menu & Battle System Guru
Hey, I'm trying to fix my window_skill menu so that only skills of certain elements are drawn. I've tried this:

Spoiler for "Window_Skill Code":
Code: [Select]
  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

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
Code: [Select]
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?
« Last Edit: June 13, 2007, 05:04:20 PM by blazinhandle »