1 wiih Prepare
2 Goodluckwarrior ( like in MHA edtion)
I wish to let to the player to choose betwen the 2 sound.
this come from NXPClient
here the fonction for the count down
Code: Select all
/***************************************************************************************************
*
* $DESCRIPTION Timer tick function. Called when the game performs its next tick.
* The following actions are performed:
* - Game start count down announcing.
* $PARAM delta Time elapsed (in seconds) since the last tick.
* $OVERRIDE
*
**************************************************************************************************/
simulated function tick(float deltaTime) {
super.tick(deltaTime);
// Client side actions.
if (role == ROLE_SimulatedProxy && client != none && !client.bNetWait) {
// Game starting count down ticked?
if (client.gInf.gameState == client.gInf.GS_Starting && lastCountDown != client.gInf.countDown) {
lastCountDown = client.gInf.countDown;
// Play count down announcer sound?
if (bEnableStartAnnouncer) {
if (1 <= lastCountDown && lastCountDown <= 10 &&
lastCountDown <= client.sConf.startTime - startCountDownWait) {
client.player.receiveLocalizedMessage(class'Botpack.TimeMessage', 16 - lastCountDown);
} else if (!bGameStartingAnnounced) {
bGameStartingAnnounced = true;
if(!bEnablePrepareMessage)
client.player.clientPlaySound(sound'Prepare', , true);
else
if(!bEnableGoodLuckWariorMessage)
client.player.clientPlaySound(sound'GoodLuckWarrior', , true);
}
}
}
}
// Server side actions.
if (role == ROLE_Authority) {
// Disable UT antispam.
if (NXPConfig(xControl.xConf).disableUTAntiSpam) {
client.player.lastMessageWindow = 0;
}
}
}
Code: Select all
// Dynamic control info.
var bool bEnableStartAnnouncer; // Enable game start count down voice announcer.
var bool bEnablePrepareMessage; // Enable Message Prepare for Battle.
var bool bEnableGoodLuckWariorMessage; // Enable Message GoodLuckWarior.
var int lastCountDown; // Last known value of gInf.countDown.
var bool bGameStartingAnnounced; // Has the game starting state been announced yet?
// Client side settings.
const SSTR_EnableStartAnnouncer = "EnableStartCountDown"; // Enable game start countdown voice.
const SSTR_EnablePrepareMessage = "EnablePrepare"; // Enable game start with Prepare.
const SSTR_EnableGoodLuckWariorMessage = "EnableGoodLuckWarrior"; // Enable game start with GoodLuckWarrior.
// Client side settings default values.
const SSTRDV_EnableStartAnnouncer = "true";
const SSTRDV_EnablePrepareMessage = "true";
const SSTRDV_EnableGoodLuckWariorMessage = "false";
i don't understand what i have do wrong. someone can help me to fix this ???
thanks in advance