HUD
A HUD is a couple of message boxes that show you your Health, Sp etc..
Here is the script! Insert in a new section above main called ‘HUD’
class Scene_Map
alias raz_hud_main main
alias raz_hud_update updatedef main
@size = $game_party.actors.size
raz_hud_main
@hud_window.dispose
@hud_dummy[0].dispose
@hud_dummy[1].dispose
@hud_dummy[2].dispose
@hud_dummy[3].dispose
enddef update
if @size != $game_party.actors.size
@hud_window.refresh
show_window
end
if @hud == true
else
main_window
end@hud_window.update
raz_hud_update
enddef show_window
@size = $game_party.actors.size
if $game_party.actors[0] == nil
@hud_dummy[0].visible = false
else
@hud_dummy[0].visible = true
endif $game_party.actors[1] == nil
@hud_dummy[1].visible = false
else
@hud_dummy[1].visible = true
endif $game_party.actors[2] == nil
@hud_dummy[2].visible = false
else
@hud_dummy[2].visible = true
endif $game_party.actors[3] == nil
@hud_dummy[3].visible = false
else
@hud_dummy[3].visible = true
end
enddef main_window
@opacity = 200
@hud_dummy = []
@hud_dummy[0] = Window_Base.new(0, 372,160, 108)
@hud_dummy[1] = Window_Base.new(160, 372,160, 108)
@hud_dummy[2] = Window_Base.new(320, 372,160, 108)
@hud_dummy[3] = Window_Base.new(480, 372,160, 108)
@hud_dummy[0].opacity = @opacity
@hud_dummy[1].opacity = @opacity
@hud_dummy[2].opacity = @opacity
@hud_dummy[3].opacity = @opacity
@hud_window = Window_HUD.new
if $game_party.actors[0] == nil
@hud_dummy[0].visible = false
else
@hud_dummy[0].visible = true
endif $game_party.actors[1] == nil
@hud_dummy[1].visible = false
else
@hud_dummy[1].visible = true
endif $game_party.actors[2] == nil
@hud_dummy[2].visible = false
else
@hud_dummy[2].visible = true
endif $game_party.actors[3] == nil
@hud_dummy[3].visible = false
else
@hud_dummy[3].visible = true
end
@hud = true
enddef turn_hud_off
for i in 0…$game_party.actors.size
@hud_window.visible, @hud_dummy[i].visible = false, false
end
return
enddef turn_hud_on
for i in 0…$game_party.actors.size
@hud_window.visible, @hud_dummy[i].visible = true, true
end
return
endend
class Window_HUD < Window_Base
def initialize
super(0, 0, 800, 600)
self.contents = Bitmap.new(width – 32, height – 32)
self.opacity = 0
unless $game_party.actors[0] == nil
@old_hp1 = $game_party.actors[0].hp
@old_sp1 = $game_party.actors[0].sp
@old_exp1 = $game_party.actors[0].now_exp
end
unless $game_party.actors[1] == nil
@old_hp2 = $game_party.actors[1].hp
@old_sp2 = $game_party.actors[1].sp
@old_exp2 = $game_party.actors[1].now_exp
end
unless $game_party.actors[2] == nil
@old_hp3 = $game_party.actors[2].hp
@old_sp3 = $game_party.actors[2].sp
@old_exp3 = $game_party.actors[2].now_exp
end
unless $game_party.actors[3] == nil
@old_hp4 = $game_party.actors[3].hp
@old_sp4 = $game_party.actors[3].sp
@old_exp4 = $game_party.actors[3].now_exp
endrefresh
enddef refresh
self.contents.clear
for i in 0…$game_party.actors.size
actor = $game_party.actors[i]
x = 25 + i * 160
self.contents.font.size = 21
draw_actor_graphic(actor, x – 15, 445)
self.contents.font.color = normal_color
self.contents.draw_text(x – 25, 360, 100, 32, actor.name)
draw_slant_bar(x + 8, 396, actor.hp, actor.maxhp, width = 100, height = 6, bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(155, 155, 60, 255))
draw_slant_bar(x + 8, 416, actor.sp, actor.maxsp, width = 100, height = 6, bar_color = Color.new(0, 0, 150, 255), end_color = Color.new(60, 155, 155, 255))
unless actor.level == 99
draw_slant_bar(x + 8, 436, actor.now_exp, actor.next_exp, width = 100, height = 6, bar_color = Color.new(0, 150, 0, 255), end_color = Color.new(60, 255, 60, 255))
else
draw_slant_bar(x + 8, 436, 1, 1, width = 100, height = 6, bar_color = Color.new(0, 150, 0, 255), end_color = Color.new(60, 255, 60, 255))
end
self.contents.font.size = 16
draw_actor_state(actor, x + 45, 360)
self.contents.font.color = normal_color
self.contents.font.bold = true
self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x + 16, 382, 100, 32, “#{actor.hp}” + “/” + “#{actor.maxhp}”, 1)
self.contents.font.color = actor.sp == 0 ? crisis_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(x + 16, 402, 100, 32, “#{actor.sp}” + “/” + “#{actor.maxsp}”, 1)
self.contents.font.color = system_color
self.contents.font.size = 20
self.contents.font.bold = false
self.contents.draw_text(x, 384, 50, 32, $data_system.words.hp)
self.contents.draw_text(x, 404, 50, 32, $data_system.words.sp)
self.contents.draw_text(x, 424, 50, 32, “Exp”)
end
enddef update
super
unless $game_party.actors[0] == nil
if @old_hp1 != $game_party.actors[0].hp or @old_sp1 != $game_party.actors[0].sp or @old_exp1 != $game_party.actors[0].now_exp
refresh
@old_hp1 = $game_party.actors[0].hp
@old_sp1 = $game_party.actors[0].sp
@old_exp1 = $game_party.actors[0].now_exp
end
end
unless $game_party.actors[1] == nil
if @old_hp2 != $game_party.actors[1].hp or @old_sp2 != $game_party.actors[1].sp or @old_exp2 != $game_party.actors[1].now_exp
refresh
@old_hp2 = $game_party.actors[1].hp
@old_sp2 = $game_party.actors[1].sp
@old_exp2 = $game_party.actors[1].now_exp
end
end
unless $game_party.actors[2] == nil
if @old_hp3 != $game_party.actors[2].hp or @old_sp3 != $game_party.actors[2].sp or @old_exp3 != $game_party.actors[2].now_exp
refresh
@old_hp3 = $game_party.actors[2].hp
@old_sp3 = $game_party.actors[2].sp
@old_exp3 = $game_party.actors[2].now_exp
end
end
unless $game_party.actors[3] == nil
if @old_hp4 != $game_party.actors[3].hp or @old_sp4 != $game_party.actors[3].sp or @old_exp4 != $game_party.actors[3].now_exp
refresh
@old_hp4 = $game_party.actors[3].hp
@old_sp4 = $game_party.actors[3].sp
@old_exp4 = $game_party.actors[3].now_exp
end
endend
endclass Window_Base 0 ? @exp_list[@level+1] – @exp_list[@level] : 0
end
end
i get errors
What kind of errors? What does it say?
Line 96 error for i in 0 $game_party.actors.size
Is it possible to turn it on/off during in game?
~RMXP’s Reply
Maybe with a little editing…..
Still an error in line 96…
I got an error on line 69. Also, fix the frigging intenting! I wager it might help to get past some of these errors you got (no offense, I’m not trying to hurt you ;))
line 96 error…
what do i have to do?
just delete?
or do i have to change it???
With the syntax errors, take all characters that are three dots in one space and make them actually three dots. Code doesn’t normally show properly with some document writers. … change to … (or three times . )
Also, some double quotes are messed up. Replace “ and ” with ” (replace slanted quotes with straight quotes)
Although, I still get an error on the third line from the bottom
class Window_Base 0 ? @exp_list[@level+1] – @exp_list[@level] : 0
the compiler claims that there is a syntax error in that line
Lol (NOT!)
got error in:
self.contents = Bitmap.new(width – 32, height – 32)
ok srry for double but fixed my prob: change the – after width and height into =.
mayb on other lines this happens also
darn now i got 1 in
self.contents.font.color = actor.sp == 0 ? crisis_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
i fixed most myself, but now i cant fix the prob overlord has
self.contents.font.color = actor.sp == 0 ? crisis_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
eror in line 96, what i must dooo???
If anyone is still interested, I’ve got it working, looks good 🙂
http://www.4shared.com/file/143451335/c4f01322/Map_HUD.html
Broken link
Get error at line 162:
self.contents.font.color = actor.sp == 0 ? crisis_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
Someway to fix this?
That was both of those exciting at the same time as insightful!
Thanks for sharing your feelings with us.
You never know when you find out what caused it in a
confused state of mind in deciding, which equipment will suit him the best.
One, get a FREE Dan Yeager who plays Leatherface in the mouth on the web
and are in foreign languages. If this is to plan ahead.
Riot Points may unlock rune pages, champions along with various boosts (experience and influence points).
Nonetheless, Riot Points cannot be spent on runes.
Riot Points may possibly be acquired for free by various routines (like as mentioning friends to League of Legends).
The actual League of Legends Store permits Summoners to
obtain more selections thru Riot Points (RP) and also Influence Points (IP).
Riot Points must often be obtained utilizing real money, although Influence Points are usually earned by participating in the video
game.
Champions need to become revealed to you using Riot Points
or Influence Points just before that they may always be
played out. However, there usually are a
number involving absolutely free champions accessible to be able to perform every full week to present summoners
the option to test champs prior to buying them. Presently there usually are
several champion types readily available which includes assassins, bruisers, supports, casters, junglers plus tanks.
Comparable to masteries, runes influence gameplay in insignificant
techniques. Runes are usually classified into Marks (offensive), Seals (shielding), Glyphs (secret) and Quintessences (utility).
Runes ought to be revealed to you within typically the Shop and also
it will be possible that will have more than 1 backup of a rune.
Summoners have to organise their own runes on the exact Runebook to help advantage by these folks.
The actual Runebook provides restricted number of slots
for each rune type, but more rune pages can be purchased from
sometimes Influence Points or Riot Points. Incorporating a couple of equal-tier runes provides
a randomly rune of often the exact tier, even though merging 5
equal-tier runes provides a higher-tier rune.
Presently there are usually also numerous activities just
like League of Legends in the event people are usually
curious in attempting a various MOBA practical experience.
If people would like for you to find out even more around just how towards attain Riot Points for League of Legends then visit, exactly how to get
free Riot Points with regard to League of Legends.
You have made some good points there. I looked on the web to find out more about
the issue and found most individuals will go along with
your views on this web site.
I used to Ƅe able to fiind good iոformatiоո frօm yiur articles.
Hello there! Would you mind if I share your blog with my zynga group?
There’s a lot of people that I think would really appreciate your
content. Please let me know. Thanks
Hey! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a community in the same niche.
Your blog provided us beneficial information to work on. You have done a outstanding
job!
Great article.
If you want to get a great deal from this piece of writing then you have to apply these techniques to your won website.
Player’s walks regarding the plains, mountains, caves and several h2o bodies.
When the rioting starts gangs could possibly be driven out in the rioting area and go
roving around trying to keep the looting and pillaging
up. In getting cost-free League of Stories
free riot points you possibly can look for guidance
by making use from the web.
You can check out the quote that will suit your budget and
call the lender or fill out the application form online.
You will be the one responsible for paying this loan back, so make sure that you know exactly what you are getting into.
Today, 3 month payday loans instant decision is introduced for you to fulfill your fiscal hurdles.
line 163