There are several scripts around but this is one someone else started and I added some scoring which may not be 100% right.
I think it's popping up a target that doesn't exist, see if you can fix it.
Code:
//////////////////////////////////////////////////////////////////
// How to use.
// 1. Place a popup target and name it to pt1
// 2. copy it 8 times and it will auto name the targets
// 3. place this line in a trigger or init nul=[] execVM "popup.sqf"
_inc = 0;
_count = 0;
_targets = [pt1,pt1_1, pt1_2, pt1_3, pt1_4, pt1_5, pt1_6, pt1_7];
_many = count _targets;
nopop=true;
{_x animate["terc",1]} forEach _targets;
hint "Setting up the Range";
sleep 2;
hint "Ready";
sleep 2;
while {_inc<20} do
{
_rnumber = random _many-1;
_rtarget = _targets select _rnumber;
_rtarget animate["terc", 0];
sleep 3;
if (_rtarget animationPhase "terc" > 0.1) then
{
_count = _count+1;
};
hint format ["Targets :%1 Hit :%2",_inc+1,_count];
_rtarget animate["terc", 1];
_inc = _inc + 1;
};
sleep 8;
hint "Session Complete";