06-10-2017, 03:41 AM
Two points.
The Game_Actor class has a method (or def) called screen_x. The method calculates and returns the 'x' position where your battler belongs in the battle-status window. This would be your system to position it horizontally.
The normal code that positions the threat level is
And obviously, if the threat is over the battler, you don't need the name.... so the first 'self.contents.draw_text' isn't needed. You may wanna try this:
Notice that I use 'a.screen_x' The a is the individual 'actor' in the actors array. And the a.screen_x refers to the x-location that the given actor needs to be placed.
self.contents.font.color = Color(255,0,0,255) .... that's how you set a font color to red. Using RGBA standards (Red Green Blue Alpha/opacity) in a range of 0-255 each.
The Game_Actor class has a method (or def) called screen_x. The method calculates and returns the 'x' position where your battler belongs in the battle-status window. This would be your system to position it horizontally.
The normal code that positions the threat level is
Code:
def refresh
self.contents.clear
actors.each_with_index {|a, i|
self.contents.draw_text(0, i*H, self.width-32, H, a.name)
self.contents.draw_text(0, i*H, self.width-32, H, @threats[i].to_s, 2)
}
end
Code:
def refresh
self.contents.clear
actors.each_with_index {|a, i|
self.contents.draw_text(a.screen_x, 0, self.width-32, H, @threats[i].to_s, 2)
}
end
Notice that I use 'a.screen_x' The a is the individual 'actor' in the actors array. And the a.screen_x refers to the x-location that the given actor needs to be placed.
self.contents.font.color = Color(255,0,0,255) .... that's how you set a font color to red. Using RGBA standards (Red Green Blue Alpha/opacity) in a range of 0-255 each.