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.
I get this error in VX: cannot convert RPG::State into Integer
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