View unanswered posts | View active topics It is currently Sat Apr 21, 2018 10:41 am



Reply to topic  [ 8 posts ] 
 EnhancedMH Scoreboard (would like to live) 
Author Message

Joined: Sat Jan 17, 2009 7:58 am
Posts: 39
Post EnhancedMH Scoreboard (would like to live)
Hi
I found this nice mutator but it is a beta version. I want try editing this mutator. The Mutator is on my server. It have a better Scoreboard but suckt. look!

Image

http://www.smiling-monsters.com/communi ... .php?t=147


Sun Apr 19, 2009 7:36 pm
Profile
User avatar

Joined: Tue Apr 29, 2008 12:09 pm
Posts: 73
Location: France
Post 
I don't think it's a bug. 9999 must be the highest score that can be displayed in this part of the HUD.


Mon Apr 20, 2009 12:06 pm
Profile

Joined: Thu Apr 10, 2008 4:36 am
Posts: 133
Post 
Unless you reduced the font size somehow


Tue Apr 21, 2009 2:13 am
Profile YIM

Joined: Sat Jan 17, 2009 7:58 am
Posts: 39
Post 
hehe y es somehow :naughty:


Tue Apr 21, 2009 1:21 pm
Profile

Joined: Sat Nov 15, 2008 12:54 pm
Posts: 166
Post 
Create a new HUD, look in challengeHUD for this section:

Code:
simulated function DrawFragCount(Canvas Canvas)
{
   local float Whiten;
   local int X,Y;

   if ( PawnOwner.PlayerReplicationInfo == None )
      return;

   Canvas.Style = Style;
   if ( bHideAllWeapons || (HudScale * WeaponScale * Canvas.ClipX <= Canvas.ClipX - 256 * Scale) )
      Y = Canvas.ClipY - 63.5 * Scale;
   else
      Y = Canvas.ClipY - 127.5 * Scale;
   if ( bHideAllWeapons )
      X = 0.5 * Canvas.ClipX - 256 * Scale;
   Canvas.CurX = X;
   Canvas.CurY = Y;
   Canvas.DrawColor = HUDColor;
   Whiten = Level.TimeSeconds - ScoreTime;
   if ( Whiten < 3.0 )
   {
      if ( HudColor == GoldColor )
         Canvas.DrawColor = WhiteColor;
      else
         Canvas.DrawColor = GoldColor;
      if ( Level.bHighDetailMode )
      {
         Canvas.CurX = X - 64 * Scale;
         Canvas.CurY = Y - 32 * Scale;
         Canvas.Style = ERenderStyle.STY_Translucent;
         Canvas.DrawTile(Texture'BotPack.HUDWeapons', 256 * Scale, 128 * Scale, 0, 128, 256.0, 128.0);
      }
      Canvas.CurX = X;
      Canvas.CurY = Y;
      Whiten = 4 * Whiten - int(4 * Whiten);
      Canvas.DrawColor = Canvas.DrawColor + (HUDColor - Canvas.DrawColor) * Whiten;
   }

   Canvas.DrawTile(Texture'BotPack.HudElements1', 128*Scale, 64*Scale, 0, 128, 128.0, 64.0);
   Canvas.DrawColor = WhiteColor;
   DrawBigNum(Canvas, PawnOwner.PlayerReplicationInfo.Score, X + 40 * Scale, Y + 16 * Scale);
}


now that's what draws the frag count, the last function called (DrawBigNum) is the one that sets the size of the numbers, create a new function (e.g. MyDrawfrags) and call that function instead. MyDrawFrags should be a modified version of DrawBigNum that looks like this:

Code:
simulated function DrawBigNum(Canvas Canvas, int Value, int X, int Y, optional float ScaleFactor)
{
   local int d, Mag, Step;
   local float UpScale;
   local byte bMinus;

   if ( ScaleFactor != 0 )
      UpScale = Scale * ScaleFactor;
   else
      UpScale = Scale;

   Canvas.CurX = X;
   Canvas.CurY = Y;
   Step = 16 * UpScale;
   if ( Value < 0 )
      bMinus = 1;
   Mag = FMin(9999, Abs(Value));

   if ( Mag >= 1000 )
   {
      Canvas.CurX -= Step;
      d = 0.001 * Mag;
      DrawDigit(Canvas, d, Step, UpScale, bMinus);
      Mag = Mag - 1000 * d;
      d = 0.01 * Mag;
      DrawDigit(Canvas, d, Step, UpScale, bMinus);
      Mag = Mag - 100 * d;
   }
   else if ( Mag >= 100 )
   {
      d = 0.01 * Mag;
      DrawDigit(Canvas, d, Step, UpScale, bMinus);
      Mag = Mag - 100 * d;
   }
   else
      Canvas.CurX += Step;

   if ( Mag >= 10 )
   {
      d = 0.1 * Mag;
      DrawDigit(Canvas, d, Step, UpScale, bMinus);
      Mag = Mag - 10 * d;
   }
   else if ( d > 0 )
      DrawDigit(Canvas, 0, Step, UpScale, bMinus);
   else
      Canvas.CurX += Step;

   DrawDigit(Canvas, Mag, Step, UpScale, bMinus);
}


just copy and rename the function to MyDrawFrags and change the size and lenght of the numbers to your needs.


Tue Apr 21, 2009 2:11 pm
Profile WWW

Joined: Sat Jan 17, 2009 7:58 am
Posts: 39
Post 
Ok thx for coding :wiggle:


Wed Apr 22, 2009 10:11 am
Profile

Joined: Sat Jan 17, 2009 7:58 am
Posts: 39
Post 
mhh question
How can i make the scorenumber smaller in this code?
She is to big for over 99999.


Sun May 31, 2009 8:22 am
Profile

Joined: Sat Nov 15, 2008 12:54 pm
Posts: 166
Post 
easy, just don't use the default place for the scores, move the hunters numbers and monsters left up a bit, then add a line for the score? then you can let your players spam the spawn factories and go like 999999999999999999999999999999999999999+ depending on their screen resolution.

Added after 3 minutes:

also remove the text line "Monster Hunt with bla bla bla by zeal" .. it stings my eyes, and author doesn't need his name constantly to show up in game, a spawn text on the HUD would be eneough imo.


Mon Jun 01, 2009 2:28 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.

phpBB SEO