Hello,
I have these two scripts I am working with:
Script 1:
private["_target","_instructor"];
_target = AR49;
_instructor = player;
endNumber = 0;
cnt = 0;
_instructor commandChat "Welcome to the AR range.";
sleep 2;
_instructor commandChat "Setting up course.";
sleep 2;
_instructor commandChat "Ready";
_target animate["terc", 0];
while{endNumber == 0}do
{
_target addEventHandler ["hit",{cnt = cnt + 1;}];
waitUntil {_target animationPhase "terc" != 0};
_target animate["terc", 0];
};
if(endNumber != 0)exitWith{};
Script 2:
private["_target","_instructor"];
endNumber = 1;
_target = AR49;
_instructor = player;
_target animate["terc", 0];
_target removeEventHandler ["hit", 0];
_instructor commandChat format ["Targets hit: %1", cnt];
cnt = 0;
_instructor commandChat "Training complete";
The problem I am having is with the counting. When I finish firing on the target I am getting 11000+ count on the number of hits, which is not real based on a M249 "200" magazine round.
Any assistance would be much appreciated.