The reason why i need a separated script is because i have this system i created:
Code:
//Bleeding.sqf
//Script and code by =WB=Tex
if (isDedicated) exitWith {};
_unit = _this select 0;
_loop = false;
while {!_loop} do {
waitUntil {(damage _unit) >= 0.70};
_loop = true;
_unit sidechat "Medic!! I'm Bleeding";
while (_loop) do {
if ((damage _unit) >= 0.70 && (damage _unit) < 0.95) then {
_unit playMove "AinjPpneMstpSnonWrflDnon_rolltoback";
_unit setHit ["legs", 1];
BlurInjured = ppEffectCreate ["DynamicBlur", 472];
BlurInjured ppEffectEnable true;
BlurInjured ppEffectAdjust[1.21];
BlurInjured ppEffectCommit 2;
_dmg = getDammage _unit;
_unit setDammage (_dmg + 0.004);
} else {
if ((damage _unit) < 0.70) then {
_loop = false;
ppeffectdestroy BlurInjured;
_unit playMove "AinjPpneMstpSnonWrflDnon_rolltofront";
sleep 1;
_unit playMove "AmovPpneMstpSrasWrflDnon";
};
};
sleep 10;
};
};
The FA BattleClearance module does not work with this system because of the loops but i don't know how to create a script with the same functionality as above (which is what i need) and at the same time compatible with the module.
The module does kicks in fine when a unit gets his legs destroyed (without this script running), but in my case with the system above even if i destroy legs with setHit command the module won't kick in.
The reason why i have the animations is because when player gets a certain damage i don't want him to be able to move. This system works fine i tested it in dedicated even though i agree the implementation is not very good because it is repeating things in the loop that could happen only once. But since i'm still learning i haven't found a better way.
Please really need help!!!