scottdog62 9 Posted August 10, 2016 Is there a script or way to make a unit incapacitated?I want a battle where once one of the units shot will not die but be kind of incapacitated, so that later you can personally execute him. Share this post Link to post Share on other sites
yacobmate 2 Posted August 10, 2016 Maybe this hit event handler is what your looking for. When the unit is hit it will fire and then you can go from there https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Hit Share this post Link to post Share on other sites
avibird 1 155 Posted August 11, 2016 You can put this in the mission init //Modified Wound System**********{ _x addEventHandler ["HandleDamage",{_dam = _this select 2; if (_dam > 0.9) then { _dam = 0.8}; _dam } ]; } foreach playableunits+switchableunits; and use any revive script you want to allow for the incapacitated state. You may need to look for the bleedout timer section of the script and put the time to -1. Sometime the script my overwrite the code above and the unit will die. you can put put the this code in the unit/units init this addEventHandler [""HandleDamage"", {_dam = _this select 2; if (_dam >0.9) then {_dam = 0.8}; _dam }; however the code will not work if you are using game save then use the above. this addEventHandler ["HandleDamage", {_dam = _this select 2; if (_dam > 0.9) then {_dam = 0.8}; _dam }]; this is working code The only issue if you use the frist code is that any unit placed on the map via editor will never die however if you copy the units to clipborad and spawn the units in the code will not work and the units will die. You can maybe set the code for what ever side you want west, east ect but I always spawn the units in with triggers. Only playable units on place down via editor for my mission. Share this post Link to post Share on other sites
scottdog62 9 Posted August 11, 2016 thanks,might be a spelling mistake in the second code comes up with missing " ] " bracket Share this post Link to post Share on other sites
lexx 1364 Posted August 12, 2016 Well yeah, it lacks the ]; at the end, as far as I can see and without testing it ingame. Share this post Link to post Share on other sites
scottdog62 9 Posted August 12, 2016 Tried that but didn't work Share this post Link to post Share on other sites
avibird 1 155 Posted August 13, 2016 hey scottdog62 I was away for a bit. This is the code to put into the unit init from the editor this addEventHandler ["HandleDamage", {_dam = _this select 2; if (_dam > 0.9) then {_dam = 0.8}; _dam }]; this is working code :) this addEventHandler [""HandleDamage"", {_dam = _this select 2; if (_dam >0.9) then {_dam = 0.8}; _dam }]; this is not working code :( I had a extra " ​and was missing an ] ​You need to add a revive script to allow for the units to be incapacitated if not they will not take anymore damage and never be incapacitated. Share this post Link to post Share on other sites
scottdog62 9 Posted August 13, 2016 Thanks trying to find the right revive script now, one that works in single player for AI.Anyone know the best one for singleplayer? Share this post Link to post Share on other sites
scottdog62 9 Posted August 13, 2016 finally got it working using pcychos wound script.one more thing i need is to free a captured soldier from the a squad of enemies, but i want the unit to be moving with the squad(as you need to ambush the squad), and once there all dead he becomes free. any help? Share this post Link to post Share on other sites