Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
mach1muscle351

Alter Damage Taken While Wounded

Recommended Posts

Heres the issue I am running into. The player gets shot/wounded/killed to fast. I want the player to get wounded fast and realistically. However to encourage teamplay I want to increase the damage taken to the player to kill him so he is forced to respawn. How do I alter this in any way? I have ace wounds module enabled. I want the enemy player to put like an entire magazine into the player laying on the ground for him to finish him off.

I wish someone could help me with the group respawn so I can encourage teamwork but this is an alternative. If players work as a squad, stick to a squad, they will conquer.

Share this post


Link to post
Share on other sites

You could probably add an event handler to deal with this. If the unit is not hurt then allow the damage as long as it does not kill him. If he is damaged then reduce the damage dealt. However, there are lots of subtle issues like what to do when an explosion happens that will need to be dealt with too.

You could add an trigger to add the handler. Condition should be:

local player

and on act

0 = player addEventHandler ["HandleDamage", { 
   _u = _this select 0;
   _damage = _this select 2;
   if (damage _u > 0.05) then {
       //Already hurt, 1/10th the damage
       _damage = _damage / 10;
   } else {
       //Not hurt, allow the damage to pass through but don't kill the player
       _damage = _damage max 0.8;
   };
   _damage
}];

That is untested btw... If you want to paste this into the on act you cannot have comments so you can paste this:

0 = player addEventHandler ["HandleDamage", { 
   _u = _this select 0;
   _damage = _this select 2;
   if (damage _u > 0.05) then {
       _damage = _damage / 10;
   } else {
       _damage = _damage max 0.8;
   };
   _damage
}];

Share this post


Link to post
Share on other sites
Sign in to follow this  

×