Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

help with checking states/conditions

wlzza

Sponsor

Ok, what I want to achieve is that when an actor is inflicted with a state such as poison, an icon will appear in the battlestatus window which I have created. Now the problem is that the script belows work in rmxp but not in rmvx. I'm guessing the problem lies in the "text = $data_states[ i].name" part of the script. Any ideas to solve this or is there a work around? Thanks.

Code:
    gauge = Cache.picture("gauge.png")
    state = []
    for i in actor.states
      text = $data_states[i].name
      case text
      when ""
        break
        return
      when "Poison"
        state[1] = true
      end
    end
    if state[1]
      self.contents.blt(x, y, gauge, Rect.new(0, 40, 16, 16),160)
    end

I get this error in VX: cannot convert RPG::State into Integer
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top