Score Announcer Mutator
- itsbowseryt
- Novice
- Posts: 21
- Joined: Tue Dec 15, 2015 1:59 pm
- Personal rank: YouTuber
- Location: Romania
- Contact:
Score Announcer Mutator
Hello everyone. I am searching for an Announcer Mutator that announce the score like "your're a tied for the lead", "you lost the lead", "you have taken the lead". So please help me find a good one. Any help will be apreciated
-
- Adept
- Posts: 426
- Joined: Tue Feb 21, 2012 7:29 pm
Re: Score Announcer Mutator
If I'm right I think this is what you are looking for.
http://unrealtournament.99.free.fr/utfi ... edback.zip
http://unrealtournament.99.free.fr/utfi ... edback.zip
- itsbowseryt
- Novice
- Posts: 21
- Joined: Tue Dec 15, 2015 1:59 pm
- Personal rank: YouTuber
- Location: Romania
- Contact:
Re: Score Announcer Mutator
Thank you so much!SC]-[WARTZ_{HoF} wrote:If I'm right I think this is what you are looking for.
http://unrealtournament.99.free.fr/utfi ... edback.zip
- UTPe
- Masterful
- Posts: 584
- Joined: Sun Jul 12, 2009 7:10 pm
- Personal rank: Dude
- Location: Trieste, Italy
- Contact:
Re: Score Announcer Mutator
Hi itsbowseryt,
there's also an updated version of the mutator (v2.1).
time ago, I remember people said original version had some problems but I never tested this new version, take a look at it.
cheers
there's also an updated version of the mutator (v2.1).
time ago, I remember people said original version had some problems but I never tested this new version, take a look at it.
cheers
- Attachments
-
- EnhancedFeedback21.zip
- (1.5 MiB) Downloaded 177 times
Personal map database: http://www.ut99maps.net
"These are the days that we will return to one day in the future only in memories." (The Midnight)
"These are the days that we will return to one day in the future only in memories." (The Midnight)
- Chamberly
- Godlike
- Posts: 1963
- Joined: Sat Sep 17, 2011 4:32 pm
- Personal rank: Dame. Vandora
- Location: TN, USA
- Contact:
Re: Score Announcer Mutator
Lol remind me of QAnnouncerNoLog... but it doesn't seem to do too well with newnet as it is broken in demo replay.
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Score Announcer Mutator
This is pretty easy to add to your existing work too. Here's how to use it within your existing modding...
Import exec lines, replace with whatever countdown sound you want. I used a nice feminine one in the RedeemerMania source if you want something different but clean and clear.
Your variables
Add this into post
Here's the timer function
Tack this section into your class at the end and don't change anything:
and finally in defprops:
It's that simple.
Import exec lines, replace with whatever countdown sound you want. I used a nice feminine one in the RedeemerMania source if you want something different but clean and clear.
Code: Select all
#exec AUDIO IMPORT FILE="Sounds\QAFOneFrag.wav" NAME="QAOneFrag" GROUP="Announcer"
#exec AUDIO IMPORT FILE="Sounds\QAFTwoFrags.wav" NAME="QATwoFrags" GROUP="Announcer"
#exec AUDIO IMPORT FILE="Sounds\QAFThreeFrags.wav" NAME="QAThreeFrags" GROUP="Announcer"
#exec AUDIO IMPORT FILE="Sounds\QAFTakenLead.wav" NAME="QATakenLead" GROUP="Announcer"
#exec AUDIO IMPORT FILE="Sounds\QAFTiedLead.wav" NAME="QATiedLead" GROUP="Announcer"
#exec AUDIO IMPORT FILE="Sounds\QAFLostLead.wav" NAME="QALostLead" GROUP="Announcer"
Code: Select all
var Pawn Leaders[32], LastLeaders[32], Player[32];
var int numLeaders, numLastLeaders, numPawns;
var int fragsLeft;
var int numLastPlayers, numLastSpectators;
Code: Select all
function PostBeginPlay()
{
numLastPlayers = Level.Game.NumPlayers;
numLastSpectators = Level.Game.NumSpectators;
SetTimer(0.1, True);
}
Code: Select all
function Timer()
{
local Pawn P;
Super.Timer();
if ((Level.Game.NumPlayers != numLastPlayers) || (Level.Game.NumSpectators > numLastSpectators))
announce();
numLastPlayers = Level.Game.NumPlayers;
numLastSpectators = Level.Game.NumSpectators;
}
Code: Select all
function bool isLeader(Pawn P)
{
local int i;
for (i = 0; i < numLeaders; i++)
{
if (P == Leaders[i])
{
return True;
}
}
return False;
}
function bool wasLeader(Pawn P)
{
local int i;
for (i = 0; i < numLastLeaders; i++)
{
if (P == LastLeaders[i])
{
return True;
}
}
return False;
}
function bool addPawnToList(Pawn P)
{
local int i;
for (i = 0; i < numPawns; i++)
{
if (Player[i] == P)
{
return False;
}
}
Player[i] = P;
numPawns++;
return True;
}
function announce()
{
local Pawn P;
local float maxScore;
local int i, j;
local PlayerPawn PP;
local TournamentGameReplicationInfo TGRI;
if (Level.Game.bTeamGame)
{
return;
}
maxScore = -99999;
numLeaders = 0;
PP = None;
for(P = Level.Pawnlist; P != None; P = P.Nextpawn)
{
if ((Bot(P) != None || PlayerPawn(P) != None) && P.PlayerReplicationInfo != None)
{
if (P.PlayerReplicationInfo.Score > maxScore && !P.IsA('Spectator'))
{
maxScore = P.PlayerReplicationInfo.Score;
numLeaders = 1;
Leaders[numLeaders - 1] = P;
}
else if (P.PlayerReplicationInfo.Score == maxScore && !P.IsA('Spectator'))
{
numLeaders++;
Leaders[numLeaders - 1] = P;
}
if (PP == None && PlayerPawn(P) != None)
PP = PlayerPawn(P);
}
}
if ((numLeaders == 1) && ((numLastLeaders > 1) || ((numLastLeaders == 1) && !wasLeader(leaders[0]))) )
{
if (PlayerPawn(Leaders[0]) != None)
{
PlayerPawn(Leaders[0]).ClientPlaySound(Sound'QATakenLead', False);
}
for (i = 0; i < numLastLeaders; i++)
{
if ( (PlayerPawn(LastLeaders[i]) != None) && (LastLeaders[i] != Leaders[0]) )
{
PlayerPawn(LastLeaders[i]).ClientPlaySound(Sound'QALostLead', False);
}
}
}
else if (numLeaders > 1)
{
for (i = 0; i < numLeaders; i++)
{
if ((PlayerPawn(Leaders[i]) != None) && (((numLastLeaders == 1) && (wasLeader(Leaders[i]))) || (!wasLeader(Leaders[i]))))
{
PlayerPawn(Leaders[i]).ClientPlaySound(Sound'QATiedLead', False);
}
}
for (i = 0; i < numLastLeaders; i++)
{
if ( !(isLeader(lastLeaders[i])) && (PlayerPawn(lastLeaders[i]) != None) )
{
PlayerPawn(lastLeaders[i]).ClientPlaySound(Sound'QALostLead', False);
}
}
}
for (i = 0; i < numLeaders; i++)
{
LastLeaders[i] = Leaders[i];
}
numLastLeaders = numLeaders;
if ( (PP != None) && (Level.Game.GameName != "Last Man Standing") )
{
TGRI = TournamentGameReplicationInfo(PP.GameReplicationInfo);
switch (TGRI.FragLimit - maxScore)
{
case 3:
if (fragsLeft > 3)
{
foreach AllActors( class 'PlayerPawn', PP )
{
PP.ClientPlaySound(Sound'QAThreeFrags', False);
}
fragsLeft = 3;
}
break;
case 2:
if (fragsLeft > 2)
{
foreach AllActors( class 'PlayerPawn', PP )
{
PP.ClientPlaySound(Sound'QATwoFrags', False);
}
fragsLeft = 2;
}
break;
case 1:
if (fragsLeft > 1)
{
foreach AllActors( class 'PlayerPawn', PP )
{
PP.ClientPlaySound(Sound'QAOneFrag', False);
}
fragsLeft = 1;
}
break;
default:
break;
}
}
}
function ScoreKill(Pawn Killer, Pawn Other)
{
local int i;
i = 0;
while (TRUE)
{
if ( NextMutator != None )
{
NextMutator.ScoreKill(Killer, Other);
}
else break;
if (i > 15)
break;
i++;
}
announce();
if ( NextMutator != None )
{
NextMutator.ScoreKill(Killer, Other);
}
}
Code: Select all
defaultproperties
{
fragsLeft=4
}
So long, and thanks for all the fish
- itsbowseryt
- Novice
- Posts: 21
- Joined: Tue Dec 15, 2015 1:59 pm
- Personal rank: YouTuber
- Location: Romania
- Contact:
- sektor2111
- Godlike
- Posts: 6412
- Joined: Sun May 09, 2010 6:15 pm
- Location: On the roof.
Re: Score Announcer Mutator
No worries, if you have MH intentions with this, then you can forget it. In 2011 were still issues blabbering with "bIsPlayer && PlayerReplicationInfo.Whatever" lousy granted into the Lord Accessed None the UT's father.UTPe wrote:Hi itsbowseryt,
there's also an updated version of the mutator (v2.1).
time ago, I remember people said original version had some problems but I never tested this new version, take a look at it.
- itsbowseryt
- Novice
- Posts: 21
- Joined: Tue Dec 15, 2015 1:59 pm
- Personal rank: YouTuber
- Location: Romania
- Contact:
Re: Score Announcer Mutator
I keep getting that error. The accesed none errorsektor2111 wrote:No worries, if you have MH intentions with this, then you can forget it. In 2011 were still issues blabbering with "bIsPlayer && PlayerReplicationInfo.Whatever" lousy granted into the Lord Accessed None the UT's father.UTPe wrote:Hi itsbowseryt,
there's also an updated version of the mutator (v2.1).
time ago, I remember people said original version had some problems but I never tested this new version, take a look at it.
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Score Announcer Mutator
Attach it here and a couple of the error log lines. I'll fix it for you.
So long, and thanks for all the fish
- Chamberly
- Godlike
- Posts: 1963
- Joined: Sat Sep 17, 2011 4:32 pm
- Personal rank: Dame. Vandora
- Location: TN, USA
- Contact:
- itsbowseryt
- Novice
- Posts: 21
- Joined: Tue Dec 15, 2015 1:59 pm
- Personal rank: YouTuber
- Location: Romania
- Contact:
Re: Score Announcer Mutator
Chamberly, i think this is, but i am not so sure if it is what he means.Chamberly wrote:I don't think I ever heard of UTToolBox, what is that?
-http://ut99.org/viewtopic.php?f=7&t=5687
- Chamberly
- Godlike
- Posts: 1963
- Joined: Sat Sep 17, 2011 4:32 pm
- Personal rank: Dame. Vandora
- Location: TN, USA
- Contact:
Re: Score Announcer Mutator
Well if he is talking about that, then that is completely strange as it don't have anything to do with the original subject of this thread.
- itsbowseryt
- Novice
- Posts: 21
- Joined: Tue Dec 15, 2015 1:59 pm
- Personal rank: YouTuber
- Location: Romania
- Contact:
Re: Score Announcer Mutator
OkChamberly wrote:Well if he is talking about that, then that is completely strange as it don't have anything to do with the original subject of this thread.