Folks,
I reviewed and tested the code, and found the reason why it wasn´t working after the first "Clear Target".
I don´t know how and why, but the first time I tried the script it worked fine. Months later, I tried it again and it just worked normally until the first "Clear target" action. then it became not registering shots anymore.
I just added two lines, now it works fine again.
Here are the two lines added in file init_target.sqf to fix the problem:
"
//if target has been cleared
if (WALK_TARGET_PUBVAR == _target) then {
_scoretable = null; //[COMBAT]Geo line added
_scoretable = [];
_score_table_count_before = 0; //[COMBAT]Geo line added
WALK_TARGET_PUBVAR = null;
publicVariable "WALK_TARGET_PUBVAR";
_target removeAction _action_cs;
//_action_cs = _target addaction ["Check scores", _path + "check_target.sqf",_scoretable];
_target removeAction _action_ct;
};
"
Thanks
[COMBAT]Geo