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.

FPSC Classic Scripts / health bar

Author
Message
JR2000
15
Years of Service
User Offline
Joined: 28th Nov 2008
Location:
Posted: 5th Jan 2009 15:13
How do I create a HEALTH BAR for the enemy.?
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 5th Jan 2009 22:35 Edited at: 5th Jan 2009 22:40
The same way you would with the players health.

You need a script running to check the health and display the proper hud for that health level.
For the enemy you would add this to their AI MAIN script.

So your state would look something like this

:state=29,healthless=99:hudunshow=hud1,hudunshow=hud2,hudshow=hud3
:state=29,healthless=66:hudunshow=hud1,hudshow=hud2,hudunshow=hud3
:state=29,healthless=33:hudshow=hud1,hudunshow=hud2,hudunshow=hud3
:state=29:state=30

Of course you would have more than 3 health levels for your bar, but this is simple for example.
You can see that each line simply checks for the health level and then displays the right one of the three huds.

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 5th Jan 2009 22:37
...a search for Health Heads will yield all the information you need...


Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 5th Jan 2009 22:44 Edited at: 5th Jan 2009 22:45
Yeah, that is for the player though and it's done by modifying the setup script.

It does offer something to look at though.

I do not like the redundant use of the hudreset.
That is not neccessary for displaying the huds, only when creating them.
Dang that is one old script though. WOW

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 5th Jan 2009 22:49
...oops! My bad. I misread the specifics.

It's still a handy reference tool.

Quote: "Dang that is one old script though. WOW"


...yeppers. One of the classics, to be sure...


Login to post a reply

Server time is: 2024-11-24 17:04:20
Your offset time is: 2024-11-24 17:04:20