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 packs add health to health hud I cant figure out how

Author
Message
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 16th Apr 2013 21:23
Hello Forum,

A while back I created a quasi animated health hud


When the player takes damage the hud reacts like this










I edited the Setuplevel.fpi like this




Now I can't seem to figure out how to add green back to the health hud when the player picks up a health pack. I haven't tried anything as far as scripting something, because i can't figure out where to put any script I would write. Do I edit the setuplevel? I have a feeling that it needs to be done with variables, which I suck at. Actually they scare me. Can't seem to wrap my head around them. Do I edit the med pack to display a hud with the regenerated health? When I looked at the condition Action lists I was hoping to find an ifhealthadded condition or something along those lines.

Any thoughts, it's gotta be simple and I am jsut missing it.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 17th Apr 2013 02:03
Since the huds are already defined here...



... all you have to do is script the pickup for the health item to add health. If I recall, there is the "plraddhealth" action which is all you need for your pickup health script. The huds should change when your health is increased or decreased.

We do a similar thing in our Egyptian game. My wife made huds to show health status. It starts with 8 green anks (full health), then goes to 6 orange, 4 yellow, and 2 red (very low health). When you pickup health, the ank huds change according to the values setup in the "setuplevel.fpi" (just as you have already done).


There's no problem that can't be solved without applying a little scripting.

Login to post a reply

Server time is: 2024-11-23 16:55:18
Your offset time is: 2024-11-23 16:55:18