Flash-Ranger 195 Posted April 22, 2017 Hello, For some reason, my Healing system is not working when the player's legs are hit .......... Can someone help ? While {True} Do { WaitUntil {Alive Player;}; Sleep 1; While {(damage player) < 0.1} Do { Sleep 1; }; Heal_Act = Player AddAction ["<img size='1.0' color='#FFFFFF' image='Images\heal_ca.paa'/>","Heal_System\Action.sqf",[],-100,False,True,"",""]; Player SetDamage 0.26; While {(Damage Player != 0.25) And Alive Player} Do { Sleep 0.1; }; Player SetDamage 0; Player RemoveAction Heal_Act; }; Share this post Link to post Share on other sites
Flash-Ranger 195 Posted April 24, 2017 Still need Help please ! Share this post Link to post Share on other sites
R0adki11 3945 Posted April 24, 2017 Just now, Flash-Ranger said: Still need Help please ! Please don't bump threads. Share this post Link to post Share on other sites
bloodwyn1756 130 Posted April 25, 2017 Not sure what you want to achieve with your script above but: Player AddAction ["<img size='1.0' color='#FFFFFF' image='Images\heal_ca.paa'/>",{player setdamage 0;},[],-100,False,True,"","alive player && (damage player != 0)"]; (written on phone so may have syntax errors) Should give the player an action, if he has damage to heal himself completely. 1 Share this post Link to post Share on other sites
Flash-Ranger 195 Posted April 25, 2017 Do you have any idea why my script doesn't work when legs are hit or damaged ? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted April 25, 2017 This snippet is weird at most. The conditions don't make any sense whatsoever. First you wait in a loop until the player is damaged more than 0.1, then you add the action which will execute "Heal_System\Action.sqf" when called, whatever that is, then you set the players damage to 0.26 and wait until it's not 0.25 I don't get what you're trying to achieve here. Cheers 1 Share this post Link to post Share on other sites
Flash-Ranger 195 Posted April 26, 2017 I'm trying to enable the player to heal himself each time he gets hit. The action give's him accès to a healing action that heals him completely. This works perfectly ... except when the legs are hit. Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted April 26, 2017 Why not simply: player addAction ["Heal yourself!",{(_this select 0) setdamage 0},[],-100,False,True,"","_target isEqualTo _this and _target isEqualTo vehicle _target AND damage _target > 0"]; Why so complicated? Cheers 1 Share this post Link to post Share on other sites
Flash-Ranger 195 Posted April 27, 2017 Right but will this activate each time _This is damaged ? Or only once until he dies ? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted April 27, 2017 1 hour ago, Flash-Ranger said: Right but will this activate each time _This is damaged ? Or only once until he dies ? You stated that you wanted the player to heal himself each time he gets hit, so that's what my snippet does. Cheers Share this post Link to post Share on other sites
Flash-Ranger 195 Posted April 27, 2017 Mine worked as well, the only problem with mine was that it did't enable the action when the LEGS are hit ... Share this post Link to post Share on other sites
Flash-Ranger 195 Posted April 27, 2017 Works Perfectly !! Final version : player addAction ["<img size='1.0' color='#FFFFFF' image='Images\heal_ca.paa'/>",{Player Action ["HealSoldierSelf", Player];player setDamage 0;},[],-100,False,True,"","_target isEqualTo _this and _target isEqualTo vehicle _target AND damage _target > 0"]; 1 Share this post Link to post Share on other sites