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 / Need help with hp bar

Author
Message
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 24th Aug 2005 23:45
I need help with a hp bar can any body help me i know its just a box or somthing but heres my code that makes the health bar/exp bar


i need to color in the hp box red and decrease it when i get hit or somthing can any body help me and for the exp bar when ever i hit somthing i need it to go up can any body help me ?

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Aug 2005 00:24 Edited at: 25th Aug 2005 00:24
Have a look at the tutorial code in Newsletter 28. The example has 20 health bars that reduce in size and change from Green to Red as they reduce.

http://www.thegamecreators.com/data/newsletter/newsletter_issue_28.html



Attachments

Login to view attachments
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 25th Aug 2005 00:27 Edited at: 25th Aug 2005 00:31
Ty but i cant find the hp bar tutorial/code

ALPHA ZERO PRODUCTIONS
20
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 25th Aug 2005 01:20
cool

Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 25th Aug 2005 03:06
Taken directly from the DBPro Challenge Thread - they had an 'RPG' challenge. This displays the characters stats on the screen:



As you can see, I had a type called Player who had various different stats, but you could use variables too. That should give you a rough idea of how you could do it.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Aug 2005 03:23
i wrote another example for bars in DBP 5.5 ages ago

http://forum.thegamecreators.com/?m=forum_view&t=37583&b=6

If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself 
CaMeRoN H
19
Years of Service
User Offline
Joined: 21st Aug 2005
Location: Who knows?
Posted: 25th Aug 2005 03:33
Hmm well mine works so i dont know why urs wont

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Aug 2005 18:00
Quote: "Ty but i cant find the hp bar tutorial/code"


At the end of the Assets tutorial, there is a download link. Click it and install. There will be links to the tutorial and sample code added to your Windows Start Menu.

Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 26th Aug 2005 22:16 Edited at: 26th Aug 2005 22:18
I dont have a fancy tutorial, but i have an i idea.

Make a bunch of lines sorta like this..
!!!!!!!!!!!!!
then have a transparrent sprite move over them as you lose health (or gain it)

Weird = Unique. Unique = Human.
Im human.
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 26th Aug 2005 23:06
okie Ooska i like ur idea ty

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 27th Aug 2005 06:14
Here is a bar that changes length - but this is for a loading screen, not health -- all you have to do is change what determines the length of the bar (which is right at the top)



...maybe one day I'll finish a project
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 29th Aug 2005 17:51
Np

Weird = Unique. Unique = Human.
Im human.

Login to post a reply

Server time is: 2024-09-24 03:26:03
Your offset time is: 2024-09-24 03:26:03