|
-
Sep 24th, 2002, 10:25 PM
#1
Thread Starter
New Member
Life Orb
I want to make a circular life orb that displays the life points of my char(like diablo II etc..)
My life variables are Hp1 for current hp, and hp2 for max hp
If you could show me a bit how i could do this and explain to me so i could implent that in my project, i would greatly apreciate.
Btw any circular shape will do, just dont make it to big :P.
thx in advance.
-
Sep 25th, 2002, 02:01 AM
#2
Junior Member
Well this is how I'd do it:
1.) Determine percentage of life you have out of max life.
ie: life/maxlife (I believe).
2.) Apply the percentage towards the number of horizontal pixel columns of the orb shape. (% * height) This lets you know how much to fill up the orb with red potion (via diablo style).
3.) User blitblt with AND and SRC (i believe again) along with a circuler mask in the shape of the orb. Then draw only the percentage height of the orb using bitblt.
Hope that helps.
-
Sep 25th, 2002, 03:59 AM
#3
Junior Member
Being such a nice guy, and went and made this show by example tutorial form for ya.
It should be fairly easy to understand.
I did the Mana orb (hey I won't do EVERY thing for ya.. .. actually...I... might.. ).
The zip includes:
The .psd file for the graphic (each layer is for each graphic you need. the container, container mask, essence, essence mask).
The VbProject file along with one form, one module. Just push play to try it.
http://amithran.hybd.net/downloads/orbTutorial.zip
heres a screen shot:

Final note: I am aware that It says mana tutorial on the forms, and above this very text, and that I use LIFE inside for the actual code. Please understand, I am VERY tired, after a LONG day of college schooling (Economy, College Algebra- the three hour classes). The idea/concept is still the same and makes no difference.
Last edited by Amithran; Sep 25th, 2002 at 04:13 AM.
I'm in college now.
-
Sep 25th, 2002, 05:53 PM
#4
Thread Starter
New Member
Thx a lot. That is all i needed.
-
Sep 25th, 2002, 06:16 PM
#5
Thread Starter
New Member
Well actualy, by looking at it more carefully, i figured that i cant use any other file format with your code, and i need some transparency around the top of the orb.
Could anyone please try and explain to me how that could be made?
-
Sep 25th, 2002, 07:21 PM
#6
Fanatic Member
Remove the background, then use masking (black on white for mask). Do a quick search of the forums for a better expanation on how to do it code wize.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|