Create a damage type with this command:
addDamageType(%name, %Self DeleteMsg, %killMsg, %vehicleDmgScale, %isDirectDamage);
Like so:
AddDamageType("RocketDirect", '<bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocket> %1', '%2 <bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocket> %1',1,1);
AddDamageType("RocketRadius", '<bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocketRadius> %1', '%2 <bitmap:add-ons/Weapon_Rocket_Launcher/CI_rocketRadius> %1',1,0);
A typical Self Delete message might be:
'%1 commit Self Delete'
And a typical kill message might be:
'%2 killed %1'
So you could do something like this:
AddDamageType("RandKill1", '%1 commit Self Delete', '%2 murdered %1',1,1);
AddDamageType("RandKill2", '%1 ended themselves', '%2 pwnd %1',1,1);
AddDamageType("RandKill3", '%1 opted out', '%2 obliterated %1',1,1);
package RandomKillMessage
{
function Armor::Damage(%data, %obj, %sourceObject, %position, %damage, %damageType)
{
%random = getRandom(1, 3);
switch(%random)
{
case 1:
%damageType = $DamageType::RandKill1;
case 2:
%damageType = $DamageType::RandKill2;
case 3:
%damageType = $DamageType::RandKill3;
}
Parent::Damage(%data, %obj, %sourceObject, %position, %damage, %damageType);
}
};
ActivatePackage(RandomKillMessage);
I haven't actually tested this code so it might explode but that's the idea