Jump to content

Recommended Posts

Hello, I want to make players not receive any damage while they are incapacitated. I have used the second solution provided by "pierremgi" here: https://forums.bohemia.net/forums/topic/227037-we-are-going-to-make-incapacitated-player-invincible/?tab=comments#comment-3390498 .

 

It works really good apart from the fact that if players are shot while their characters are in the ragdoll state between being alive and the "incapacited animation", they can still receive damage and be killed instantly. For example players who are shot with a weapon with a high firerate will always be 'incapacitated' and then 'executed', but if they are incapacitated and then given time for the character to roll over on his back, they would not receive any damage. I do not want this, I want players to be invinsible the second they lose control over their characters and become incapacitated. Is there any way to do this?

Share this post


Link to post
Share on other sites

@MrSydney,

Try something like,

this setUnconscious true;

this addEventHandler ["HandleDamage", {
	params ["_unit"];
if (lifeState _unit isEqualTo "INCAPACITATED") then {0};
}];

Have fun!

  • Like 1

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

×