ScourgeDragon
Member
http://h1.ripside.net/ScourgeDragon/Fla ... Please.jpg[/IMG]
I get this error when I try to start a new game. Strangely, This was working fine a few days ago. The only additions I've made were adding a weather script, but I've tried removing that and still nothing.
Here's the line. . .
Here's the script. . .
I get this error when I try to start a new game. Strangely, This was working fine a few days ago. The only additions I've made were adding a weather script, but I've tried removing that and still nothing.
Here's the line. . .
Code:
for i in 1..( (min / max.to_f) * width - 1)
Code:
class Scene_Map
alias raz_map_battlehud_main main
alias raz_map_battlehud_update update
def main
@battle_switch = 1
@enemy_hud = Enemy_HUD.new
@enemy_hud.visible = false
raz_map_battlehud_main
@enemy_hud.dispose
end
def update
@enemy_hud.update
unless @hud_visible == true
if $game_switches[@battle_switch]
@enemy_hud.visible = true
@hud_visible = true
@hud_off = true
end
end
unless @hud_off == false
if $game_switches[@battle_switch] == false
@enemy_hud.visible = false
@hud_visible = false
@hud_off = false
end
end
raz_map_battlehud_update
end
end
class Enemy_HUD < Window_Base
def initialize
super(300, 0, 340, 64)
self.contents = Bitmap.new(width - 32, height - 32)
@old_hp_enemy = $game_variables[ENEMYHP_VARIABLE_ID]
refresh
end
def refresh
self.contents.clear
self.contents.draw_text(0, 0,100,32,"Boss")
min = $game_variables[ENEMYHP_VARIABLE_ID] == 0 ? 1 : $game_variables[ENEMYHP_VARIABLE_ID]
max = $game_variables[ENEMYMAXHP_VARIABLE_ID] == 0 ? 1 : $game_variables[ENEMYMAXHP_VARIABLE_ID]
draw_slant_bar(100, 12, min, max, 200, 9, Color.new(150, 0, 0, 255), Color.new(255, 0, 0, 255))
end
def update
super
if @old_hp_enemy != $game_variables[ENEMYHP_VARIABLE_ID]
refresh
@old_hp_enemy = $game_variables[ENEMYHP_VARIABLE_ID]
end
end
end
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Slant Bar(by SephirothSpawn)
#--------------------------------------------------------------------------
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
# Draw Border
for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
end
# Draw Background
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
end
# Draws Bar
for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height - 1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end
end