Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Need a quick script please and thanks...

i'm not sure how easy the script is but im using the picture script for the HP and SP...

# Tibuda's Pictoral Indicators
class Window_BattleStatus
#-------------------------------------
EMPTY_HP_VIAL = "vial_empty"
EMPTY_SP_VIAL = "vial_empty"
HP_VIAL = "vial_red"
SP_VIAL = "vial_blue"
def draw_vial(picture, percent, x, y)
return if percent == 0
src_bitmap = RPG::Cache.picture(picture)
wid, hei = src_bitmap.width, percent * src_bitmap.height / 100
dif = src_bitmap.height - hei
src_rect = Rect.new(0, dif, wid, hei)
dest_rect = Rect.new(x, y + dif, wid, hei)
self.contents.stretch_blt(dest_rect, src_bitmap, src_rect)
src_bitmap.dispose
end
def draw_actor_hpvial(actor, x, y)
if actor.maxhp > 0
draw_vial(EMPTY_HP_VIAL, 100, x, y)
percent = 100 * actor.hp / actor.maxhp
draw_vial(HP_VIAL, percent, x, y)
self.contents.draw_text(x, y + 40, 60, 32, actor.hp.to_s)
end
end
def draw_actor_spvial(actor, x, y)
if actor.maxsp > 0
draw_vial(EMPTY_SP_VIAL, 100, x, y)
percent = 100 * actor.sp / actor.maxsp
draw_vial(SP_VIAL, percent, x, y)
self.contents.draw_text(x, y + 40, 60, 32, actor.sp.to_s)
end
end
#-------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
#-------------------------------------
# This is the part i've edited
draw_actor_hpvial(actor, actor_x, 24)
draw_actor_spvial(actor, actor_x + 80, 24)
#-------------------------------------
if @level_up_flags
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
end


...and this is what i wanted...

I would like to use different pictures for different classes...
if i was a scripter i would have done this edit myself...
can anyone do it...

ex : Fighter - HP = Heart/ SP = Sword, Gunner HP = Heart/ SP = Ammo etc...
 
You see where it says empty_vial and vial_red? those are the names of the graphics. put in the name of what you want for them(as in your grpahics youve got for them). not sure how to make each class different though. ask someone else for that.
 
Wow you like dots. If I knew more about scripting I would try to help, but I hardly know anything. Ill see what I can do. But, why dont you just ask the maker of the script to help you? (Ill ask my friend to see if he knows how to do it.)

Sorry, friend couldnt do it. but yeah, just ask the scripter, he should know how to do it
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top