[Resolved] Aquarian Request - HUD

Started by Aqua, May 03, 2009, 02:52:24 pm

Previous topic - Next topic

Aqua

May 03, 2009, 02:52:24 pm Last Edit: May 08, 2009, 03:43:56 pm by Elite Four Aqua
Would anyone be willing to script a HUD for me? :D
The trickiest part /should/ be the drawing the bars in proportion since it's curvy... lol

Here is what I want the HUD to look like:
Spoiler: ShowHide

Wonder where I got the inspiration for the HUD...  :roll:

I want the Red bar to be HP and the Blue one to be SP.
It's a One Hero game, so only $game_actors[1] info is needed.

Now the individual images.

Face: ShowHide


HP Parts: ShowHide




SP Parts: ShowHide




Thanks! :D

Reno-s--Joker

I could try (and most likely fail :[) if no-one else is up for this. Looks really interesting and would kick ass if completed. :)

fugibo

Just grab the code for Blizz's HUD, or any other, and just replace the bars with this. It wouldn't be hard at all.

Aqua

Would those scripts accomodate for the curve in my bars?

fugibo

It depends. Do you want them to curve, even when they're not full? That would make it a (tiny bit) harder.

Aqua

Yeah, I do...
That's why I didn't do this myself; I didn't know how to keep the curve @.@

fugibo

I'll take a quick crack at it. You'll have to fiddle with it a bit yourself, though, and debug it (I don't have RMXP)

Aqua

Okay.  All help is appreciated :)

Reno-s--Joker

The only way I can think of doing the curve is using that image cutting technique. Anyhow, looks like your script is in good hands now Aqua. :)

fugibo

Yes, that's how I'm doing it. Actually, I could either have it pre-cut or cut it myself. Hmm...

OOP for the win! I'll make an object that does either

Blizzard

Jut use blt on those bitmaps to transfer the proper area into the bar.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

So blt starting from the right but display starting from the left? XD

winkio

Here's a hint, based on what I remember: 
self.contents.blt(x_pos, y_pos, image, new Rect(0, 0, width, height))


just replace width with something like actor[0].hp / actor[0].maxhp * 130.  Basically, what blt does is only draws the image inside the rectangle.  so just put the full image of the bar in your pictures folder and you are set.

Just felt like clarifying what Blizzard said, because I couldn't tell if you understood it from your post.

fugibo

Yeah... I'm not gonna write this script today, but I will tell you how to copy the curve: (replace CURVE_WIDTH with... the width of the curve :P)

bar = Bitmap.new( <filename> )

p = $game_actors[0].hp.to_f / $game_actors[0].maxhp.to_f
w = p * bar.width

self.bitmap.blt(w - CURVE_WIDTH, 0, bar, Rect.new(w - CURVE_WIDTH, 0, CURVE_WIDTH, bar.height)
self.bitmap.blt(0, 0, bar, Rect.new(0, 0, w - CURVE_WIDTH, bar.height)


I'm pretty sure that will work.

Aqua

May 08, 2009, 02:47:22 pm #14 Last Edit: May 08, 2009, 04:18:44 pm by Elite Four Aqua
:D Thanks

I'll try it out and tell you how it goes.

Edit:

Yay!!!  Got HP to work :D
And MP should be easy now

Thanks a LOT guys!

Edit Edit:

Got the whole Hud working :D
Learned some scripting stuff with this, too.
Thanks, again!

fugibo

Are you using this with BlizzABS? If so, then you could probably add in some other cool features, animating damage, to make this pwn even more.

Blizzard

Did you even see the recent Blizz-ABS with bouncing damage text? xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fugibo

I mean, the HUD bars scroll to the right instead of just being shorter.

Oh, and you mean that feature that Cogwheel has been using for over two years, right? XD j/k

Aqua

Quote from: Biker WcW on May 08, 2009, 06:43:49 pm
I mean, the HUD bars scroll to the right instead of just being shorter.


Hm... what do you mean by that?
The bar travels across the game screen? D:

legacyblade

I think he means it will animate (like a loading bar) rather than just "POOF, I IZ SHORTER". That would be really cool. I hope you make this into a bABS hud, as we're sorely in need of good blizzABS huds.