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.

Newcomers DBPro Corner / Health bar increase and decrease

Author
Message
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Jun 2004 22:32
Hey I found this code in the codebase.

How do I make
1. The plain that fills with the red horizantle
2. Make it increase and decrease based on damage by bullets?
Any help is appreciated.

Got anime?
I do.
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 11th Jun 2004 22:45 Edited at: 11th Jun 2004 22:47
are you using dbc or dbpro?

i ran the code in dbpro and it works fine

question #1 How do i make the plain that fills with the red horizontal?

the red horizontal is the cylinder being textured based on the value of health.

question #2 How do I make it increase and decrease based on damage by bullets?


its not really a piece of code that you can put directly into your program but a guideline code that needs editing
well in your function that checks to see if they player is hit or your main loop when your character is hit get the amount of damage it does and set health to that amount and then use the function _update_health(health,1,1)
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 11th Jun 2004 22:49
I'm using dbcEnhanced and for the first one I ment the plain not the cylinder, how do I make the verticle plain go horzontal but retain it's parameters, I might know the answer myself, but I'm probably wrong...

Got anime?
I do.
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 11th Jun 2004 22:53
to change the box to be horizontal instead of vetical change the box commands in the update health function updated function is
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 12th Jun 2004 02:41
Yeah, I kinda need to know how to have the health move up and down by itself still...
And have it the way it was in the snippet...

Got anime?
I do.
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 12th Jun 2004 14:29
if you insist on using the code then..
just increase or decrease health by however much life u want added or subtracted and then call the function _update_health(perc,img,obj)

its just a guideline, you dont even need the cylindder as it is just drawing a box on the screen based on the variable health. my guess is that the cylinder is there to activate 3d mode by having db do it when an object is made for the first time
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 12th Jun 2004 15:15
Thanks I'll see what I can do with your help...

Got anime?
I do.
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 12th Jun 2004 16:02
I have written a basic fps game to help you understand, commented most of it but i tired now and need some sleep 5a.m. here


if you still need help ill explain it the best i can for i am still a beginner
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 12th Jun 2004 19:12
I can't run it, for the global variables it says unknown command, this demo was made for DBCenhanced right?
If I didn't poin it out in the first place then it's my fault, but I'll be upgrading soon to DBPRO so it might help in the future.
Thanks...

Got anime?
I do.
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 12th Jun 2004 20:26
global variabls are only in dbpro which i used to code it but the same effect can be used by using variable arrays, i think


I am unfimiliar with DBC but i heard that variable arrays work in place of global variables, it works in dbpro and they globals are variable arrays and will work in dbc. there might be other commands, just let me know and i will try to fix/change them
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 14th Jun 2004 15:11
I can't test your program still, but thanks for trying to help me out...

Got anime?
I do.
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 14th Jun 2004 15:23
i dont know what commands dbpro has that dbc enhanced dosent have so i dont know what to change to get it to work

Login to post a reply

Server time is: 2024-09-22 13:35:26
Your offset time is: 2024-09-22 13:35:26