a day ago i asked about using icons as status display instead of the default text and i was given a script... this script works, it replace the text with any icons i choose. however it's not a finish script....
the script: (paste above _main)
as you can see, there is no draw states for eneny but only actor...
so durring battle when an enemy is poison or whatever, the game froze and give an error in the window_help because it can not detect the enemy status...
window_help error(highlight in read.)
i need someone help here to make this work. thank you
the script: (paste above _main)
Code:
class Window_Base < Window
#--------------------------------------------------------------------------
# * Make State Text String for Drawing
# actor : actor
# width : draw spot width
# need_normal : Whether or not [normal] is needed (true / false)
#--------------------------------------------------------------------------
def make_battler_state_text(battler, width, need_normal)
# Make text string for state names
text = []
for states in battler.states
unless $data_states[states].rating == 0
next if states == nil
text << $data_states[states].name
end
end
# Return completed text string
state_text = text.size == 0 ? "" : text
return state_text
end
#--------------------------------------------------------------------------
# * Draw State
# actor : actor
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw spot width
#--------------------------------------------------------------------------
def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
for i in text
self.contents.blt(x + text.index(i) * 32, y, RPG::Cache.icon(i), Rect.new(0, 0, 32, 32))
end
end
end
as you can see, there is no draw states for eneny but only actor...
so durring battle when an enemy is poison or whatever, the game froze and give an error in the window_help because it can not detect the enemy status...
window_help error(highlight in read.)
Code:
class Window_Help
def set_enemy(enemy)
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
[COLOR=Red]text += " " + state_text[/COLOR]
end
set_text(text, 1)
end
i need someone help here to make this work. thank you