Hi,
I scripted a "medipack" myself, that works as following:
- when you can't stand you're healed till you can stand
- when your hands are hit, you're healed till your hands are OK
- maximum heal is 25%, but if the other conditions are met, the medipack is used!
_handshit = handsHit _unit
_canstand = canStand _unit
_dmg = getDammage _unit
_pri = 0
?_handshit == 1 && _canStand: _pri = 1
?!_canStand: _pri = 2
_oldpri = _pri
_maxHeal = 0.25
#mediloop
_unit setDammage (getDammage _unit - 0.02)
?_pri == 1 && handsHit _unit == 0: _pri = 0
?_pri == 2 && canStand _unit: _pri = 1
?(_dmg - getDammage _unit > _maxHeal || _oldpri - _pri == 1 || getDammage _unit == 0): goto "medinext"
goto "mediloop"
#medinext
you have to define what _unit is in this script! If you added this script with addaction you can make
_unit = _this select 0
in the head of the script!
greetings,
Vektorboson
EDIT:
please replace the * in handshit with an "i"