redleouf 10 Posted December 16, 2016 Hi, I am actually working on a personnal script to run in singleplayer to simulate a respawn when I should die. What I do is that when I take a sufficient amount of damage, I disable damage, teleport myself to spawn, clean my damage amount and renable damage. It works fine, but the mission also use the ACE and it's basic medical system. I want to keep it that way but if I don't erase all the HandleDamage handlers before putting mine, my script still run but I die anyway when I "respawn" because of ACE. Is there any way I can tell ACE that I do not want to die when taking a certain amount of damage? I tried calling the ace_medical_fnc_treatmentAdvanced_fullHeal function in my script after setting allowDamage to false but it doesn't work. Here is my code so far : SPR_HandleDamage_EH = { private ["_unit", "_killer", "_amountOfDamage"]; _unit = _this select 0; _amountOfDamage = _this select 2; _killer = _this select 3; if (alive _unit && _amountOfDamage >= 0.9) then { hint "Respawning"; _unit allowDamage false; if (hayACE) then { [_unit, _unit] call ace_medical_fnc_treatmentAdvanced_fullHeal; } _unit setPos(getMarkerPos("respawn_west")); _unit setDamage 0; _amountOfDamage = 0; _unit allowDamage true; }; _amountOfDamage }; [] spawn { waitUntil { !isNull player }; [] spawn SPR_Player_Init; hintSilent format["SP Respawn Script Loaded"]; }; SPR_Player_Init = { //player removeAllEventHandlers "HandleDamage"; player addEventHandler ["HandleDamage", SPR_HandleDamage_EH]; }; pastebin Share this post Link to post Share on other sites
davidoss 552 Posted December 16, 2016 Try [_unit] call ace_medical_fnc_init; Share this post Link to post Share on other sites
redleouf 10 Posted December 16, 2016 Where would you put that? In the hayACE if condition? Share this post Link to post Share on other sites
dchan200 18 Posted December 16, 2016 Yep, try putting the code under: [_unit, _unit] call ace_medical_fnc_treatmentAdvanced_fullHeal; It should reset a unit's ACE medical state (1, 2). Share this post Link to post Share on other sites
Devastator_cm 434 Posted December 17, 2016 out of topic but how did you make that red tag next to subject by the way? :) Share this post Link to post Share on other sites