UPDATED: 07.04.2013! Thought I'd post this. This is a simple more advanced killticker I've created for use in my own missions. Thought some other people might have use of it as well. It's not hard to implement. For AI it displays classname of unit, for player it displays user name. It shows a maximum of 8 kills at a time, but this you are of course free to change. killTicker.sqf tlq_killTicker = { _this addMPEventHandler ['MPKilled',{ _unit = _this select 0; _killer = _this select 1; _newKill = [_unit,_killer]; if (count tlq_killArray > 100) then {tlq_killArray = []}; tlq_killArray set [count tlq_killArray,_newKill call tlq_parseKill]; [] spawn tlq_killList; if (player == _killer) then {_newKill spawn tlq_killPopUp}; } ]; }; tlq_parseKill = { _line = ""; _killerName = ""; _victimName = ""; _killerString = ""; _victimString = ""; _killerColor = "#99D5FF"; _victimColor = "#99D5FF"; _victim = _this select 0; _killer = _this select 1; if (!(isplayer _killer)) then { _killerName = getText (configFile >> "CfgVehicles" >> format["%1",typeOf _killer] >> "Displayname"); if(vehicle _killer != _killer) then {_killerName = getText (configFile >> "CfgVehicles" >> format["%1 crew",typeof vehicle _killer] >> "Displayname")}; }else{_killerName = name _killer}; if (!(isplayer _victim)) then { _victimName = getText (configFile >> "CfgVehicles" >> format["%1",typeOf _victim] >> "Displayname"); if(vehicle _victim != _victim) then {_victimName = getText (configFile >> "CfgVehicles" >> format["%1 crew",typeof vehicle _victim] >> "Displayname")}; }else{_victimName = name _victim}; if ((_killer==player) or (_killer == vehicle player)) then { _killerColor = "#ffff00"; //yellow } else { _killerColor = side group _killer call BIS_fnc_sideColor; _r = _killerColor select 0; _g = _killerColor select 1; _b = _killerColor select 2; _killerColor = [_r+0.1,_g+0.1,_b+0.1]; _killerColor = _killerColor call BIS_fnc_colorRGBtoHTML; }; if (_victim==player) then { _victimColor = "#ffff00"; //yellow } else { _victimColor = side group _victim call BIS_fnc_sideColor; _r = _victimColor select 0; _g = _victimColor select 1; _b = _victimColor select 2; _victimColor = [_r+0.1,_g+0.1,_b+0.1]; _victimColor = _victimColor call BIS_fnc_colorRGBtoHTML; }; _killerString = format["<t color='%1'>%2</t>",_killerColor ,_killerName]; _victimString = format["<t color='%1'>%2</t>",_victimColor,_victimName]; //the line which shows the final formatted kill _line = switch(true) do { case(_killer == _victim): {format ["%1 killed themselves",_killerString]}; case(isNull _killer): {format ["Bad luck for %1",_victimString]}; default {format ["%1 killed %2",_killerString,_victimString]}; }; _line; }; tlq_killPopUp = { _victim = _this select 0; _killer = _this select 1; _victimName = ""; _victimString = ""; _victimColor = "#99D5FF"; if (!(isplayer _victim)) then { _victimName = getText (configFile >> "CfgVehicles" >> format["%1",typeOf _victim] >> "Displayname"); if(vehicle _victim != _victim) then {_victimName = getText (configFile >> "CfgVehicles" >> format["%1 crew",typeof vehicle _victim] >> "Displayname")}; }else{_victimName = name _victim}; _victimColor = (side group _victim call BIS_fnc_sideColor) call BIS_fnc_colorRGBtoHTML; _victimString = format["<t color='%1'>%2</t>",_victimColor,_victimName]; _line = if ((_killer == player) and (_victim == player)) then { "<t size='0.5'>You killed yourself</t>"; } else { format ["<t size='0.5'>You killed %1</t>",_victimString]; }; [_line,0,0.8,2,0,0,7017] spawn bis_fnc_dynamicText; }; tlq_killList = { //flush kills and show most recent if (time - tlq_killTime > 37) then { tlq_displayedKills = []; }; tlq_displayedKills set [count tlq_displayedKills, tlq_killArray select (count tlq_killArray - 1)]; _tickerText = ""; _c = 0; for "_i" from (count tlq_displayedKills) to 0 step -1 do{ _c = _c + 1; _tickerText = format ["%1<br />%2",tlq_displayedKills select _i,_tickerText]; if (_c > 8) exitWith{}; }; hintsilent parsetext _tickerText; //["<t size='0.4' align='right'>" + _tickerText + "</t>",safeZoneX,safeZoneY,10,0,0,7016] call bis_fnc_dynamicText; tlq_killTime = time; }; //declare global variables tlq_killArray = []; tlq_displayedKills = []; tlq_killTime = 0; //start kill registration for player if (!isNull player) then { player spawn tlq_killTicker; }; if (isServer) then { //ai { if (!(isPlayer _x)) then { _x spawn tlq_killTicker}; } forEach allUnits; }; Hotfix 07.04.2013: Tweaked things regarding dedicated servers
Changes 31.03.2013: Fixed bug that caused no kills to get displayed clientside
Fixed deletion of kills when lot of kills were happening
Moved kill detection clientside because of locality issues
Changes 30.03.2013: Fixed bugs that caused script not to fire
Brightened up colors on kills to increase readability
Made global variables unique as to not interfere with other scripts
Added "tlq_killTicker_init" variable to check if script has initialized
Changes 21.03.2013: Now registers much more accurately for aoe-based weapons (grenades, bombs)
Kill detection handled by server (or hosting player)
Colors for killed players now reflect their ingame color (blufor blue, opfor red).
Fixed some bugs relating to unexpected types of deaths
Now registers kills for ALL editor-placed units by default (includes playable units waiting to spawn)
Known bugs: When player disconnects from an ai-disabled slot, script will fire.
Installation: Place in your mission folder and run "killTicker.sqf" from init.sqf like so: null = execVM "killTicker.sqf"; To add kill detection to units created during mission, run the following command after creation: yourunitName spawn tlq_killTicker;