Jump to content
Sign in to follow this  
Phantom Six

Light Health Bar Script

Recommended Posts

I was bored so I decided to make some little script that will display how much health you have left below your ammo count via hintsilent.

Basically how this work is, by default you are at full health so it will display to you Health: 100. Let say you were to get shot and only have 40 health left, it will then tell you Health: 40

To use this basically put this in the init of all playable units so players can see how much health they got

null = this execVM "lives.sqf";

Here is the script. Just save this to lives.sqf

while {alive _this} do
{
_health = getDammage player;
hintSilent parseText format["<t>Health: %1</t>",(((1-_Health)*100)-((1-_Health)*100 mod 1))];
sleep 0.01;
};

Enjoy :D

Share this post


Link to post
Share on other sites

You should try to convert this into a display dialog instead of a hintSilent since something looping every 0.01 seconds will ruin any other hints the mission might provide. It's also horribly gamey, but whatever. :)

Share this post


Link to post
Share on other sites

Be aware that the "head_hit" and "body" selections also have individual damage values that can kill you if they reach over 0.9 first.

Share this post


Link to post
Share on other sites

In my missions I use cuttext to display the health in the lower right corner. When you use a weird number (e.g. 666 cuttext [].) there is also hardly a conflict with other cuttexts. Further, I only have it displayed, when the health is below 100 (or below 99) %, to make things less arcadish with a permanent on-screen-text. Nevertheless some kind of health display IS quite useful. In real life you feel whether your "health" is 90% or 15% (you know what I mean!) after a hit. When you can still stand in Arma, it's somehow hard to say whether a step downwards from a stone is the missing 1% to make you die or whether the bullet rarely injured you.

Edited by RogueTrooper

Share this post


Link to post
Share on other sites

Ahhh I see. Well, I just made this although I knew its quite arcadey just for a future reference say a zombie mission or some sort. Well, zombies are gamey themselves, but I won't use them for more realistic missions. Probably would just use it for some arcadey missions anyways.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×