Jump to content
Sign in to follow this  
1para{god-father}

Count number of Revives

Recommended Posts

I am using Norrins Revive script, and need a way to try and record the number of Revives a play makes in a mission and store them?

then export them to a text file at the end of the game.

Is this possible ?

Share this post


Link to post
Share on other sites

what version of Norrins revive are you using? i ask because some use a old version, and some use the new.

for exporting, i think only way is output to .rpt file, but that is not a perfect solution.

place this in init.sqf:

Amount_Of_Revives_Done = [];

when you find where the revive is done in whatever revive version you are doing, you can add this, where the action is completed:

if (({(name _healer) in _x} count Amount_Of_Revives_Done) == 0) then {
Amount_Of_Revives_Done = Amount_Of_Revives_Done + [[(name _healer),1]];
publicVariable "Amount_Of_Revives_Done";
} else {
{
	if ((name _healer) in _x) then {
		_cnt = _x select 1;
		_x set [1, (_cnt + 1)];
	};
} foreach Amount_Of_Revives_Done;
publicVariable "Amount_Of_Revives_Done";
};

and when mission is ended, run this code to print all results to .rpt, it should include those JIP and left during the mission as well.

diag_log "__________________________________ REVIVE COUNTS __________________________________";
_num = 0;
{
_num = _num + 1;
_name = _x select 0;
_revives = _x select 1;
diag_log format["%1 ---- %2 has revived %3 times during the game",_num,_name,_revives];
} foreach Amount_Of_Revives_Done;
diag_log "__________________________________ REVIVE COUNTS END ______________________________";

now for easy locating, you can simply search your .rpt file after the mission for REVIVE COUNTS and you will find all participating revivers listed numerically by playername and amount of revives done.

Share this post


Link to post
Share on other sites

Thanks Demonized,

I am using the latest I belive v5 , i`ll try that out later I know the score card gets saved to the server - startlog at the end of a mission so will see if it is possible to save it with the score card .

As the Medic have an unfair score at the end of a match, this is what i have been workin on so far !

http://www.tacticalrealismleague.co.uk/specops/roster

Looking at it should I put it in Revive_player.sqf then under // Revive/reward function ?

Edited by psvialli

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  

×