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 / Call of Duty Health Like Script, need some help

Author
Message
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 21st Dec 2008 11:48 Edited at: 21st Dec 2008 11:50
Hi all,
I programmed a script so your health wouldn't be in numbers as ordinary but invisible and undetermined like COD, when it's too low it shows u a warning and the bloody screen shows, here's what I've done so far



where (htext) is the warning message ex: "You're very injured, Take cover and search for a med kit"
and (blood) is the bloody screen

well the problem is:
- It works well 1st time but when I heal and get hurt again only blood displays but not text, and it appears and fades out instantly when I heal again, i tried using (hudunshow) for the text as well and it worked but it doesn't look good :S
- I need the (hit hud), I used zoom.tga since it's the closest one but in green :S so where can I find it?

ps: ping sound is just a test

TY all..
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Dec 2008 19:44 Edited at: 21st Dec 2008 20:08
Your looping the state that creates the HUDs. (that's a no-no)

Try this



As far as the green HUD goes, just edit the RGB Curves in Paint.NET or whatever paint program you use.
I can't distribute an edited version of TGC's file but I can make you a red screen like that from scratch easy enough.
Its just a gradient with the transparency and color added.

Here is a simple red one (rush job)...


Don't forget to visit Conjured Entertainment

Attachments

Login to view attachments
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 21st Dec 2008 20:02 Edited at: 21st Dec 2008 20:04
I know cause I thought once it's shown it removed and I have to open it agaib... still same problem..
ty 4 passin by

and btw I nearly solved the hud problem, i designed an almost typical one, here it is if any1 is interested..

it's PNG Transparent

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Dec 2008 20:11 Edited at: 21st Dec 2008 20:12
Sorry I was posting my HUD as you were.

Try unshow ing the second HUD instead of the fadeout.




Don't forget to visit Conjured Entertainment
Bibo4PC
16
Years of Service
User Offline
Joined: 17th Oct 2008
Location: Middle Earth
Posted: 21st Dec 2008 20:24 Edited at: 21st Dec 2008 20:26
u seem to have missed the rest of my post :S

Quote: "well the problem is:
- It works well 1st time but when I heal and get hurt again only blood displays but not text, and it appears and fades out instantly when I heal again, i tried using (hudunshow) for the text as well and it worked but it doesn't look good :S"


btw thx for the eyehud
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Dec 2008 20:32 Edited at: 21st Dec 2008 21:49
Sorry, I was speed reading the description. (its a bad habit when I have a code snippet to look at)

I never had much luck with the hudfadeout either.
I have no clue as to what the problem is, but I am going to play with it to see if I can figure something out.

"I'll be back"

Edit
Well, it seems that the HUDFADEOUT seems to only like working in the same state that you show the HUD. (probably due to its built in timer)
So, it waits to show until the fadeout is called for some reason.

We know that using the unshow works fine, but it doesn't give the effect you want.
So, the obvious solution (workaround) is to use both.
I made a second instance of the same HUD so one can be shown/unshown (for displaying between states - our missing part of the effect), and the second one used for the fade out.
The extra texthud simply fills the void created by our fadeout issue.

Anyway, I think this
comes close to what you are after.

Just remember to change the paths back for your images, because I used my own images for testing.


Don't forget to visit Conjured Entertainment

Login to post a reply

Server time is: 2024-11-24 16:55:38
Your offset time is: 2024-11-24 16:55:38