chaching.cs

I love this script by na85. It brings joy to my game. But if often was confusing playing lak, so I decided to see what other .wav files would be appropriate to employ, as the same sound as used in chaching is used in lak quite often. So I found one I really liked, cheer.wav but it is too low in volume to use in game. It would be perfect but it's too quiet to use when there are a hundred other sounds playing in the game at the time. At first I employed evillaugh.wav but it actually startled me whenever it played so that would never do. Then I considered the trex.wav, but those just didn't get it, I wanted to have the crowd cheer my victories. So I found another that really stands out and is about as appropriate as bounty_bonus.wav or cheer.wav. That file is Flair.wav and it is quite a motivator to make you go out and kill red triangle guys. There are several others that would also work out well such as goal.wav, you can find sounds in your audio.vl2 and voice.vl2 files. Simply replace this line: "fx/misc/bounty_bonus.wav" with the path to the sound you wish to employ.



//chaching.cs by Nathan "na85" Van Ymeren
//Plays the Cha Ching sound whenever you kill someone.
//goes in base/scripts/autoexec
//Need help?  Contact na85 via tribesnext.com (preferred) or nathan.vany@gmail.com

function chachingJoinedServer(%msgType, %msgString, %clientName, %clientId, %targetId, %isAI, %isAdmin, %isSuperAdmin, %isSmurf, %guid) {
	if (strstr(%msgString, "Welcome to Tribes2") != -1) {
		$myname = detag(%clientName);
	}
}

function killsound(%msgType, %msgString, %victimname, %vgen, %vposs, %killername, %kgen, %kposs, %damageType) {
	%killer = detag(%killername);
	if (%killer $= $myname) {
		%wavfile = "fx/misc/bounty_bonus.wav";
		%source = alxCreateSource(AudioChat, %wavfile);
		alxPlay(%source);
	}
}

package chaching {
	function DispatchLaunchMode() {
		parent::DispatchLaunchMode();
		addMessageCallBack('MsgLegitKill', killsound);
		addMessageCallBack('msgVehicleKill', killsound);
		addMessageCallBack('msgCTurretKill', killsound);
		addMessageCallBack('msgTurretKill', killsound);
		addMessageCallBack('msgSelfKill', killsound);
		addMessageCallBack('MsgHeadshotKill', killsound);
		addMessageCallBack('msgExplosionKill', killsound);
		addMessageCallback('MsgClientJoin', chachingJoinedServer);
	}
};
activatePackage(chaching);
Sign In or Register to comment.