Goal
I am trying to modify the def draw_actor_state method under Window_Base to show a change in color when the actor has a state greater than 1 (Knockout) in the database.
Here is what it looked like before modification (default):
...and here is what it looks like with user modification:
Problem
My previous modification in red is where this error occurs:
I'm not sure how I would define that or fix the problem otherwise. Thanks in advance!
I am trying to modify the def draw_actor_state method under Window_Base to show a change in color when the actor has a state greater than 1 (Knockout) in the database.
Here is what it looked like before modification (default):
Code:
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
self.contents.draw_text(x, y, width, 32, text)
end
Code:
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 :
[COLOR=Red]actor.states > 1 ? text_color(5) :[/COLOR] normal_color
self.contents.draw_text(x, y, width, 32, text)
end
My previous modification in red is where this error occurs:
Code:
Script 'Window_Base' line 192: NoMethodError occured.
undefined method '>' for []:Array