Jump to content
Sign in to follow this  
Martinez.E

Rifle Range "score" not showing in chat? Script issue?

Recommended Posts

the part in question is

 

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

 

Is there something extra that it should be doing?

 

In the init.sqf it has this as well.. rr1, rr2 etc being the 6 lanes on the rifle range. now the script below is the popup1.sqf, the Init.sqf is in the main directory..so idk if they above code is trying to call this? i need it so while they shoot the targets, it counts hits.

 

["rr1", {(_this select 0) globalChat format["Rifle Lane 1 Targets :%1 Hit :%2",_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
["rr2", {(_this select 0) globalChat format["Rifle Lane 2 Targets :%1 Hit :%2",_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
["rr3", {(_this select 0) globalChat format["Rifle Lane 3 Targets :%1 Hit :%2",_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
["rr4", {(_this select 0) globalChat format["Rifle Lane 4 Targets :%1 Hit :%2",_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
["rr5", {(_this select 0) globalChat format["Rifle Lane 5 Targets :%1 Hit :%2",_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
["rr6", {(_this select 0) globalChat format["Rifle Lane 6 Targets :%1 Hit :%2",_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;











//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: TODO: Author Name
//////////////////////////////////////////////////////////////////

//                 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=[max,set,time] execVM "popup.sqf" 
// max  is the total number of targets that will popup
// set is the max number of targets that can popup per set upto a max of 3
// time is the amount of time to hit the targets before they go down

if (!isServer) exitWith{};
 
_inc     = 0;
_count   = 0;
_targets = [pt1_50,pt1_100, pt1_150, pt1_200, pt1_250, pt1_300];
_group   = 0;
  
{_x  animate["terc",1]} forEach _targets;//puts the targets down before the start

nopop=true; // sets them to stay down until triggered to popup

sleep 2;
[-2, {hint _this}, "Welcome to Blank's Primary Qualification Range"] call CBA_fnc_globalExecute;
sleep 5;
[-2, {hint _this}, "Please ensure that one 20 round magazine is loaded"] call CBA_fnc_globalExecute;
sleep 5;
[-2, {hint _this}, "Assume a prone supported position and scan your lane"] call CBA_fnc_globalExecute;
sleep 5;
[-2, {hint _this}, "Range Starting in 10 seconds!"] call CBA_fnc_globalExecute;
sleep 5;
[-2, {hint _this}, "Range Starting in 5 seconds!"] call CBA_fnc_globalExecute;
sleep 5;
[-2, {hint _this}, "Range is hot!"] call CBA_fnc_globalExecute;


pt1_50 animate["terc", 0];

sleep 4;


if (pt1_50 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_50 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

 
// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END


pt1_200 animate["terc", 0];

sleep 6;

if (pt1_200 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_200 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];

sleep 4;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];

sleep 5;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_300 animate["terc", 0];

sleep 8;

if (pt1_300 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_300 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_250 animate["terc", 0];

sleep 7;

if (pt1_250 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_250 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_50 animate["terc", 0];

sleep 3;

if (pt1_50 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_50 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_200 animate["terc", 0];

sleep 6;

if (pt1_200 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_200 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];

sleep 5;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_250 animate["terc", 0];

sleep 7;

if (pt1_250 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_250 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];
pt1_200 animate["terc", 0];

sleep 8;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
if (pt1_200 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_200 animate["terc", 1];
};
_inc = _inc +2;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];
pt1_300 animate["terc", 0];

sleep 10;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
if (pt1_300 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_300 animate["terc", 1];
};
_inc = _inc +2;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];
pt1_250 animate["terc", 0];

sleep 9;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
if (pt1_250 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_250 animate["terc", 1];
};
_inc = _inc +2;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_200 animate["terc", 0];

sleep 6;

if (pt1_200 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_200 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];

sleep 5;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];
pt1_250 animate["terc", 0];

sleep 9;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
if (pt1_250 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_250 animate["terc", 1];
};
_inc = _inc +2;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

sleep 6;
[-2, {hint _this}, "Reload one, 20 round magazine"] call CBA_fnc_globalExecute;
sleep 10;
[-2, {hint _this}, "Assume a prone unsupported position."] call CBA_fnc_globalExecute;
sleep 10;
[-2, {hint _this}, "Scan your Lane, Range is hot!"] call CBA_fnc_globalExecute;

pt1_200 animate["terc", 0];

sleep 6;

if (pt1_200 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_200 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_250 animate["terc", 0];

sleep 8;

if (pt1_250 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_250 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];

sleep 6;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_300 animate["terc", 0];
pt1_200 animate["terc", 0];

sleep 10;

if (pt1_300 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_300 animate["terc", 1];
};
if (pt1_200 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_200 animate["terc", 1];
};
_inc = _inc +2;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];
pt1_200 animate["terc", 0];

sleep 12;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
if (pt1_200 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_200 animate["terc", 1];
};
_inc = _inc +2;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_250 animate["terc", 0];
pt1_150 animate["terc", 0];

sleep 9;

if (pt1_250 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_250 animate["terc", 1];
};
if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +2;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];

sleep 6;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

sleep 6;
[-2, {hint _this}, "Move to a kneeling unsupported position"] call CBA_fnc_globalExecute;
sleep 10;
[-2, {hint _this}, "Scan your Lane, Range is hot!"] call CBA_fnc_globalExecute;

pt1_150 animate["terc", 0];

sleep 8;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_50 animate["terc", 0];

sleep 4;

if (pt1_50 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_50 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];

sleep 5;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];

sleep 6;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];

sleep 5;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_50 animate["terc", 0];

sleep 4;

if (pt1_50 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_50 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];

sleep 5;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_150 animate["terc", 0];

sleep 6;

if (pt1_150 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_150 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_50 animate["terc", 0];

sleep 4;

if (pt1_50 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_50 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

pt1_100 animate["terc", 0];

sleep 5;

if (pt1_100 animationPhase "terc" != 0) then {
        _count = _count + 1;
} else {
        pt1_100 animate["terc", 1];
};
_inc = _inc +1;

sleep 4;

// 5. Display Score
["rr1", [range, _inc, _count]] call CBA_fnc_globalEvent;
// 5. END

sleep 8;
[-2, {hint _this}, "Cease Fire! Cease Fire! Cease Fire!"] call CBA_fnc_globalExecute;
{_x  animate["terc",0]} forEach _targets;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×