Jump to content
Sign in to follow this  
CapitanStratos

Adding more "health" to the player?

Recommended Posts

Is possible to add more "life" or resistance or something like that to the player soldier? So it can resist several bullets. Not realistic but will make for some fun missions for the kids.

Is possible somehow?

Share this post


Link to post
Share on other sites

Have a look at this and subsequent posts. If it isn't quite what you're after, simple changes like substituting "0.6" for "0.9" would likely do it.

Share this post


Link to post
Share on other sites
Have a look at this and subsequent posts. If it isn't quite what you're after, simple changes like substituting "0.6" for "0.9" would likely do it.

So I need to add this line

this addEventHandler ["HandleDamage", {if ((((damage unit1) + (_this select 2)) < 0.9) or ((_this select 1) in ["hands","legs"])) then {_this select 2} else {0.9}}]

In the init field and my player will be invencible? Can I do that for other players in my squad as well?

Share this post


Link to post
Share on other sites
So I need to add this line

this addEventHandler ["HandleDamage", {if ((((damage unit1) + (_this select 2)) < 0.9) or ((_this select 1) in ["hands","legs"])) then {_this select 2} else {0.9}}]

In the init field and my player will be invencible? Can I do that for other players in my squad as well?

You can add that init line to as many units as you choose.

Units won't be invincible - they will still take damage and over a certain amount will be unable to move until healed. If you want invincibility for any unit, just add

this allowDamage false;

to that unit's Init line.

Share this post


Link to post
Share on other sites

What exactly this do?

this addEventHandler ["HandleDamage", {if ((((damage unit1) + (_this select 2)) < 0.9) or ((_this select 1) in ["hands","legs"])) then {_this select 2} else {0.9}}]

I tried it and I can't die

Share this post


Link to post
Share on other sites

Well, yes - isn't that what you wanted?

If you want to limit the number of times a player can be hit without being killed I think you'll need a separate script run from the init line.

Share this post


Link to post
Share on other sites
Well, yes - isn't that what you wanted?

If you want to limit the number of times a player can be hit without being killed I think you'll need a separate script run from the init line.

To limit the number of his can be great, If not possible ill keep current way. Thanks.

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  

×