here the sceehsot for see what i'm trying to fix :
the color must be :
Gold for the saint
Red for the Heretic
Blue for the player ( default color on this game type)
Code: Select all
Class HolywarsNexgenHudFix extands HolyWarsHud;
Local class = Holywars.HolywarsGame;
Var NexgenHudColors[3]; // Colors of the Hud on Holywars Gametype.
var theSaintName; // Player who is the saint.
var bHeretic; // Player who is a Hertic Loser !.
var MyName; // Player who must kill the saint to ern the halo to become the saint.
// Fonction set the NexgenHud
Function setNexgenHud int NexgenHudColor, NexgenHudcolorsNum;
Local Nexgenclient Client;
Check if(!Gameclass=HolyWars.HolyWarsGame & useUTHUDColor=False);
{
if (player == SaintName || HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).TheSaint == SaintName || HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).TheSaint == SaintName) {
NexgenHUDColors = NexgenHudColors[0]; }
else
if (player == bHertic || HolyPRI(PlayerOwner.PlayerReplicationInfo).bHeretic; == bHertic || HolyPRI(PlayerOwner.PlayerReplicationInfo).bHeretic; == bHertic) {
NexgenHUDColors = NexgenHudColors[1];}
else
if (player == MyName || PlayerOwner.PlayerReplicationInfo.PlayerName== MyName || PlayerOwner.PlayerReplicationInfo.PlayerName== MyName ){
NexgenHUDColors = NexgenHudColors[2];}
else
¨let the others mutators do their job.}
}
/***************************************************************************************************
*
* $DESCRIPTION Default properties block.
*
**************************************************************************************************/
defaultproperties
{
NexgenHudColors[0] GoldColor=(R=255,G=255)
NexgenHudColors[1] RedColor=(R=255)
NexgenHudColors[2] BlueColor=(B=255)
version=1.00
versionCode=1
PackageName="HolywarsNexgenHudFix"
Author Letylove49
}
Code: Select all
Heading: --------------------HolyWars--------------------
Heading: --------------------NexgenCC--------------------
Heading: --------------------Nexgen112SDL--------------------
Heading: --------------------HolywarsNexgenHudFix--------------------
Warning: Failed to load 'HolywarsNexgenHudFix.u': Can't find file 'HolywarsNexgenHudFix.u'
Warning: Failed loading package: Can't find file 'HolywarsNexgenHudFix.u'
Log: Analyzing...
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\HolywarsNexgenHudFix\Classes\HolywarsNexgenHudFix.uc)
Critical: UClassFactoryUC::FactoryCreateText
Critical: UFactory::StaticImportObject
Critical: UMakeCommandlet::Main
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 10/01/22 00:16:57
here the class HolywarsHud
Code: Select all
//=============================================================================
// HolyWarsHUD.
//=============================================================================
class HolyWarsHUD expands ChallengeHUD;
simulated function HUDSetup(canvas canvas)
{
local String MyName, SaintName;
local bool bHeretic;
Super.HUDSetup(canvas);
MyName = PlayerOwner.PlayerReplicationInfo.PlayerName;
bHeretic = HolyPRI(PlayerOwner.PlayerReplicationInfo).bHeretic;
SaintName = HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).TheSaint;
if( MyName == SaintName )
HUDColor = GoldColor;
else if( bHeretic )
HUDColor = RedColor;
else
HUDColor = BlueColor;
SolidHUDColor = HUDColor;
if ( Level.bHighDetailMode )
HUDColor = Opacity * 0.0625 * HUDColor;
}
simulated function PostRender( canvas Canvas )
{
super.PostRender( Canvas);
// Display HolyWars Information
if( !PlayerOwner.bShowScores )
DrawHolyInfo( Canvas );
}
simulated function DrawHolyInfo( canvas Canvas )
{
local float XOffset, YOffset, XL, YL;
local String HolyMessage, VersionMessage, MyName, SaintName;
local bool bHaloSpawned, bHeretic;
MyName = PlayerOwner.PlayerReplicationInfo.PlayerName;
bHeretic = HolyPRI(PlayerOwner.PlayerReplicationInfo).bHeretic;
SaintName = HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).TheSaint;
bHaloSpawned = HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).bHaloSpawned;
Canvas.Font = MyFonts.GetBigFont( Canvas.ClipX );
if( MOTDFadeOutTime > 0 )
{
VersionMessage = "HolyWars"@HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).Version;
Canvas.StrLen(VersionMessage, XL, YL);
XOffset = (Canvas.ClipX - XL ) / 2;
YOffset = Canvas.ClipY - 128*Scale - 2 * YL;
Canvas.SetPos(XOffset, YOffset);
Canvas.DrawColor = WhiteColor;
Canvas.DrawText(VersionMessage, False);
HolyMessage = "http://www.planetunreal.com/flatware";
Canvas.DrawColor = GoldColor;
}
else if( bHeretic )
{
HolyMessage = "You're a Heretic, loser!";
Canvas.DrawColor = RedColor;
}
else if( MyName == SaintName )
{
HolyMessage = "You are the saint! Go berserk!";
Canvas.DrawColor = GoldColor;
}
else if( !bHaloSpawned )
{
HolyMessage = "Waiting for the Halo to spawn...";
if( !PlayerOwner.PlayerReplicationInfo.bIsSpectator )
HolyMessage = HolyMessage@"Get ready to rock...";
Canvas.DrawColor = WhiteColor;
}
else if( SaintName == "" )
{
if( !PlayerOwner.PlayerReplicationInfo.bIsSpectator )
HolyMessage = "Find the Halo! Hurry!";
else
HolyMessage = "The Halo is free.";
Canvas.DrawColor = GreenColor;
}
else
{
HolyMessage = SaintName@"is the Saint!";
if( !PlayerOwner.PlayerReplicationInfo.bIsSpectator )
HolyMessage = HolyMessage@"Kill that bastard!";
Canvas.DrawColor = GoldColor;
}
Canvas.StrLen(HolyMessage, XL, YL); // Check string's length
XOffset = (Canvas.ClipX - XL ) / 2; // Center message
YOffset = Canvas.ClipY - 128*Scale - YL; // Place it over weaponinfo
Canvas.SetPos(XOffset, YOffset);
Canvas.DrawText(HolyMessage, False);
Canvas.DrawColor = WhiteColor;
}
defaultproperties
{
}