gotcha i see what you mean i didn't think of that thanks tally.
one other thing though,......wait for it.
i want to enable the "prepare for battle" sound to play first then 2.5 seconds after the "good luck out there buddy" sound to play.now i have it all installed correctly and i have put this in the:
x_treme_scripts_RCX.pk3/extreme/_ex_welcome.gsc
main()
{
if(level.ex_modoff) return;
if(level.ex_exlite <= 2)
{
// turn off healthbar for cod2 health/damage system
if(level.ex_cod2health)
self setClientCvar("scr_healthbar", "0");
else
self setClientCvar("scr_healthbar", "1");
}
// turn off radar for dm, qdm, qtdm
if(level.ex_radaroff || level.ex_quadbased || level.ex_currentgt == "dm")
self setClientCvar("scr_radar", "0");
else
self setClientCvar("scr_radar", "1");
// turn of stance indicator (waste of space!)
if(level.ex_hudstance)
self setClientCvar("scr_stance", "1");
else
self setClientCvar("scr_stance", "0");
if(isDefined(self.pers["skipserverinfo"]))
return;
self.ex_welcome = newClientHudElem(self);
self.ex_welcome.alignX = "left";
self.ex_welcome.alignY = "top";
self.ex_welcome.x = 0;
self.ex_welcome.y = 0;
self.ex_welcome.alpha = 1;
self.ex_welcome.sort = 5;
self.ex_welcome SetShader("exwelcome/welcome.tga",640,480);
while(!self AttackButtonPressed())
{
wait 0.1;
continue;
}
if(isDefined(self.ex_welcome))
self.ex_welcome destroy();
}
announce()
{
if(isdefined(self.pers["PrepareBattleSound"]))
return;
if(level.awe_preparebattle == 1)
{
self playLocalSound("prepare");
wait 2.5;
self playLocalSound("goodluck");
}
else if(level.awe_preparebattle == 2)
{
self.pers["PrepareBattleSound"] = true;
self playLocalSound("prepare");
wait 2.5;
self playLocalSound("goodluck");
}
else
return;
}
you see at the bottom i have inserted the announce part?
this must be the correct place for it to be placed because it works just fine when i load the game,problem though, even though i have set it to play on spawn only in the audio.cfg file it keeps repeating the same announcement every time the player spawns,here is how i have scripted it:
//***************************************************************************************************
// Announcements, Obituary and Killing Spree Sounds // default 0, 0 = off, 1 = on
//***************************************************************************************************
// First kill per game/round
set ex_firstblood "1"
// Good luck - plays on first team spawn only
set ex_goodluck "1"
set ex_prepare "1"
// Players connecting/disconnecting sound
set ex_plcdsound "0"
// Play personal obituary sounds
set ex_playpsoundo "1"
// Play personal killspree sounds
set ex_playpsoundk "1"
// Announce result at end of map
set ex_anresult "1"
do you notice the good luck part?
i only want it to play when the player or client first joins the game not everytime he re-spawns.is there somewhere else i should be putting some sort of control code for this to work correctly?
cheers bud,sorry for hasstling you on this subject