This will allow you to replace all flag related sounds for each team individually.
1. Open sounds.zip in base folder and rename flag1.ogg, flagreturn.ogg, and flagcapture.ogg to bflag1.ogg, bflagreturn.ogg, and bflagcapture.ogg. You can use these for either team now.
2. Save code below as flagsounds140.acs.cs and put it in your modules folder.
3. Edit the sounds for each event. I made them all the same initially but you can use (most of) the sounds in sounds.zip or put custom .wav or .ogg sounds in your base folder.
Code:
// flag sounds for 1.40
$Flag::DropSound[0]="shieldhit"; // BE
$Flag::DropSound[1]="bxplo4"; // DS
$Flag::DropSound[def]="bxplo4"; // default
$Flag::ReturnSound[0]="shieldhit";
$Flag::ReturnSound[1]="bxplo4";
$Flag::ReturnSound[def]="bxplo4";
$Flag::GrabSound[0]="shieldhit";
$Flag::GrabSound[1]="bxplo4";
$Flag::GrabSound[def]="bxplo4";
$Flag::PickupSound[0]="shieldhit";
$Flag::PickupSound[1]="bxplo4";
$Flag::PickupSound[def]="bxplo4";
$Flag::CapSound[0]="shieldhit";
$Flag::CapSound[1]="bxplo4";
$Flag::CapSound[def]="bxplo4";
function Flag::DropSounds( %team, %cl ) {
switch ( %team ) {
case "0":
localSound( $Flag::DropSound[0] );
break;
case "1":
localSound( $Flag::DropSound[1] );
break;
default:
localSound( $Flag::DropSound[def] );
break;
}
}
function Flag::ReturnSounds( %team, %cl ) {
switch ( %team ) {
case "0":
localSound( $Flag::ReturnSound[0] );
break;
case "1":
localSound( $Flag::ReturnSound[1] );
break;
default:
localSound( $Flag::ReturnSound[def] );
break;
}
}
function Flag::GrabSounds( %team, %cl ) {
switch ( %team ) {
case "0":
localSound( $Flag::GrabSound[0] );
break;
case "1":
localSound( $Flag::GrabSound[1] );
break;
default:
localSound( $Flag::GrabSound[def] );
break;
}
}
function Flag::PickupSounds( %team, %cl ) {
switch ( %team ) {
case "0":
localSound( $Flag::PickupSound[0] );
break;
case "1":
localSound( $Flag::PickupSound[1] );
break;
default:
localSound( $Flag::PickupSound[def] );
break;
}
}
function Flag::CapSounds( %team, %cl ) {
switch ( %team ) {
case "0":
localSound( $Flag::CapSound[0] );
break;
case "1":
localSound( $Flag::CapSound[1] );
break;
default:
localSound( $Flag::CapSound[def] );
break;
}
}
Event::Attach(eventFlagDrop, Flag::DropSounds);
Event::Attach(eventFlagReturn, Flag::ReturnSounds);
Event::Attach(eventFlagGrab, Flag::GrabSounds);
Event::Attach(eventFlagPickup, Flag::PickupSounds);
Event::Attach(eventFlagCap, Flag::CapSounds);