Main Menu
  • Welcome to The RPG Maker Resource Kit.

Need help with this side view battle system script

Started by mrslayer, June 23, 2009, 04:22:30 AM

0 Members and 1 Guest are viewing this topic.

mrslayer

Found it out..

Grafikal

#1
I'm going to totally speculate cause I don't know how to script, but I can occasionally recognize it.

[spoiler=my guess]
i'm guessing, it's in here.
def change_hp_bar
  j = false
 @old_hp = @battler.hp if @old_hp == -1
  i = @old_hp
  loop do
    i -= 10
    if i < @battler.hp
      i = @battler.hp
      j = true
    end
    rate = i.to_f / @battler.maxhp
    @color5 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
    @color6 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
    @bar_hp_sprite.bitmap.clear
    @bar_hp_sprite.bitmap.fill_rect(0, 0, 64, 10, @color1)
    @bar_hp_sprite.bitmap.fill_rect(1, 1, 62, 8, @color2)
    @bar_hp_sprite.bitmap.gradation_rect(2, 2, 60, 6, @color3, @color4, 1)
    #@bar_hp_sprite.bitmap.fill_rect(2, 2, 60, 6, @color3)
    @bar_hp_sprite.bitmap.gradation_rect(2, 2, 64 * rate - 4, 6, @color5, @color6, 2)
    #@bar_hp_sprite.bitmap.fill_rect(2, 2, 64 * rate - 4, 6, @color5)
    @bar_hp_sprite.opacity = self.opacity
    Graphics.update
    if j == true
      j = false
      break
    end
  end
  @old_hp = @battler.hp
end



also, im answering as to maybe where lol, and not how.[/spoiler]

but... best wait for MA. haha

femdragonz

my charas got stuck during battle so i made sure that charas and battlers have same names and everything and it only works for a few now