Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Zynic
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location:
Posted: 24th Nov 2006 06:01
i can't really get a healthbar code on the forums or codesource for DBC so i came here...i need a bar for health, how to put it on the screen and make it subtract, also i want to replace the mouse with something else. i did find one of those but it was slow and didn't help at all. so if you could help me out with that it'd be muchly appreciated!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 24th Nov 2006 06:23
If you require 2d the simple ink and box commands will suffice.

If your mixing 3d and 2d you will need to create a 3d panel and update its texture with the ink and box commands when the health changes, otherwise you will pull down your frames per second in your main loop by always using the ink and box commands when they only need to used at the call of the health changing.

Zynic
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location:
Posted: 24th Nov 2006 06:38
ugh thats sounds a little confusing but i think i got it. after making the HUD and everything just change the texture of the healthbar whenever i get hurt to make it go down right?
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 24th Nov 2006 07:37
yes thats correct, using an offscreen bitmap to make the texture will be part of the function.

Zynic
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location:
Posted: 24th Nov 2006 17:17
ok now that i think i've got it right...i'll have to add in the bitmaps and HUD first haven't gotten around to it yet...well really i have to make it. but i need to be able to replace the mouse with a bitmap i made so that when i move the mouse the bitmap moves instead, becoming the mouse...its just to make a cool effect and will be useful in the RPG me and my friend are making along with a RTS i plan to make after this FPS. this is 3D btw and i heard 2D doesn't like 3D much.
Zynic
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location:
Posted: 24th Nov 2006 17:21
oh also i got a command that does it but it won't let the background bmp i got load cause of a cls command and if i take out the cls command then it leaves copies of itself everywhere. and it goes really sluggishly had to put it in sync rate 0 to make it consistent but even then...help me out with this one plz.

Login to post a reply

Server time is: 2025-05-26 05:45:43
Your offset time is: 2025-05-26 05:45:43