Announcement

Collapse
No announcement yet.

Scaleform Scoreboard only displaying score for blue team

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Scaleform Scoreboard only displaying score for blue team

    Hello all

    As the title suggests the issue I am having with my scoreboard is that from an unknown reason, it will only display information about the blue team (information = lists of individuals on the team). I have checked this over a network, and it doesn't matter if you are the server/client, on team blue, or team red, you can only see the information for the blue team.

    This is the code for my scoreboard:
    Code:
    class PHGFxUIScoreboard extends UTGFxTweenableMoviePlayer;
    
    
    var GFxObject RootMC;
    var GFxObject ScoreboardMC, OverlayMC, TitleMC, BlueTeamMC, RedTeamMC;
    var GFxObject TimeMC, TimeTF, Title_TitleGMC, TitleTF, TitleGMC;
    
    var GFxObject BlueHeaderMC, BlueScoreTF, BlueTitleTF;
    var GFxObject RedHeaderMC, RedScoreTF, RedTitleTF;
    
    //var GFxObject FooterMC, FooterItemMC;
    
    var byte RedTeamIndex, BlueTeamIndex;
    var GFxObject PlayerRow;
    
    var bool bPlayerRowTween;
    var bool bTeamGame;
    
    var GFxObject MapNameTF, Title_TitleNMC;
    var WorldInfo    ThisWorld;
    
    
    
    struct ScoreEntry
    {
    	var string PlayerName;
    	var int PlayerScore;
    	var int PlayerDeaths;
    	var bool bHasFlag;
    	var int PlayerKills;
    	var int PlayerFlags;
    	var int PlayerFlagReturn;
    };
    /**
     Cached version of data being displayed by scoreboard - used to avoid querying/updating Flash UI unnecessarily (for performance) 
    */
     var ScoreEntry RedEntries[12], BlueEntries[12];
    
    
    
     struct ScoreboardState
    {
      var int     RemainingTime;
      var int     RedScore;
      var int     BlueScore;
    	var String	PlayerName;		
    	var byte    PlayerPlace;
    	var float	PlayerScore;
    	var int		PlayerDeaths;
    	var int PlayerKills;
    	var int PlayerFlags;
    	var int PlayerFlagReturn;
    };
    
    var ScoreboardState PreviousState;
    
    struct ScoreRow
    {
      var GFxObject MovieClip;
    	var GFxObject InnerMovieClip;
      var GFxObject DeathsTF;
      var GFxObject ScoreTF;
      var GFxObject NameTF;
     	var GFxObject KillsTF;
      var GFxObject FlagsTF;
      var GFxObject FlagReturnTF;
    };
    
    
    var array<ScoreRow> BlueItems, RedItems;
    
    var transient int NameCnt;
    
    /**
    var GFxObject Footer_NameTF;
    
    
    var GFxObject Footer_PlaceLabelTF;
    
    
    var GFxObject Footer_PlaceTF;
    
    
    var GFxObject Footer_ScoreLabelTF;
    
    
    var GFxObject Footer_ScoreTF;
    
    
    var GFxObject Footer_DeathsLabelTF;
    
    
    var GFxObject Footer_DeathsTF;
    */
    var bool bInitialized;
    
    
    
    function bool Start(optional bool StartPaused = false)
    {
      super.Start();
      Advance(0);
    
    	if (!bInitialized)
    	{		
    		ConfigScoreboard();		
    	}	
    
    	Draw();
      return true;
    }
    
    function PlayOpenAnimation()
    {	
    	TitleMC.GotoAndPlay("open");
    	//FooterMC.GotoAndPlay("open");
      OverlayMC.GotoAndPlay("open");	
    }
    
    function PlayCloseAnimation()
    {	
    	TitleMC.GotoAndPlay("close");
    	//FooterMC.GotoAndPlay("close");
    	OverlayMC.GotoAndPlay("close");	
    }
    
    /*
     * Cache references to Scoreboard's MovieClips for later use.
     */
    function ConfigScoreboard()
    {
    	local PlayerController PC;
    	
    	ThisWorld = GetPC().WorldInfo;
    	
    	RootMC = GetVariableObject("_root");
    	ScoreboardMC = RootMC.GetObject("scoreboard");
    
    	// Scale and shift for 16:9.  Last minute hack.
    	RootMC.SetFloat("_xscale", 95);
    	RootMC.SetFloat("_yscale", 95);
    	RootMC.SetFloat("_y", RootMC.GetFloat("_y")+25);
    
    	PC = GetPC();		
    	if (PC != none)
    	{
    		bTeamGame = True;
    		
    		ScoreboardMC.GotoAndStop("team");	
    		OverlayMC = ScoreboardMC.GetObject("team");
    		RedTeamMC = OverlayMC.GetObject("red_team");
    		BlueTeamMC = OverlayMC.GetObject("blue_team");
    		
    		`log("Config scoreboard called");
    	}
    
    	TitleMC = ScoreboardMC.GetObject("title");
    	
    	TimeMC = TitleMC.GetObject("time");
    	Title_TitleGMC = TitleMC.GetObject("title_g");
    
    	TimeTF = TimeMC.GetObject("textField");
    	TitleTF = Title_TitleGMC.GetObject("textField");
    	
    	Title_TitleNMC = TitleMC.GetObject("title_n");
    	MapNameTF = Title_TitleNMC.GetObject("textField");
    	
    	MapNameTF.SetString("text", ThisWorld.GetMapName(false));
    	/**
    	FooterMC = ScoreboardMC.GetObject("footer");
    	FooterItemMC = FooterMC.GetObject("footer_item");
    	Footer_NameTF = FooterItemMC.GetObject("name");
    	Footer_PlaceLabelTF = FooterItemMC.GetObject("tplace");
    	Footer_PlaceTF = FooterItemMC.GetObject("place");
    	Footer_ScoreLabelTF = FooterItemMC.GetObject("tscore");
    	Footer_ScoreTF = FooterItemMC.GetObject("score");
    	Footer_DeathsLabelTF = FooterItemMC.GetObject("tdeaths");
    	Footer_DeathsTF = FooterItemMC.GetObject("deaths");	
    	*/
    	PreviousState.PlayerDeaths = -1;
    	PreviousState.PlayerScore = -1.0;
    	PreviousState.PlayerPlace = -1;	
    	PreviousState.PlayerKills = -1;
    	PreviousState.PlayerFlags = -1;
    	PreviousState.PlayerFlagReturn = -1;
    
    	/**
    	Footer_PlaceLabelTF.SetText("YOUR PLACEMENT");
    	Footer_ScoreLabelTF.SetText("SCORE");
    	Footer_DeathsLabelTF.SetText("DEATHS");
    	*/
    	
    	SetupRedTeam();
    	SetupBlueTeam();
    
    	//FloatScoreboardAnimationX(true);
      //FloatScoreboardAnimationY(true);
    
    	bInitialized = true;
    }
    
    /*
     * Cache references to MovieClips used for the Blue Team.
     */
    function SetupBlueTeam()
    {
      local byte i;    
      local ScoreRow sr;
      local ASDisplayInfo dI;
    
      for (i = 0; i < 12; i++)
      {
        `log("Blue team set up");
    		BlueItems[i] = sr;
        BlueItems[i].MovieClip = BlueTeamMC.GetObject("item"$(i+1));
        BlueItems[i].MovieClip.SetFloat("_z", 200);
    
    		// Give 50% Alpha blend to all rows.
    		// Non-empty rows will be corrected to 100% later.
        dI = BlueItems[i].MovieClip.GetDisplayInfo();
        dI.Alpha = 50.0;
        BlueItems[i].MovieClip.SetDisplayInfo(dI);
    
        BlueItems[i].InnerMovieClip = BlueItems[i].MovieClip.GetObject("item_g");
        BlueItems[i].DeathsTF   = BlueItems[i].InnerMovieClip.GetObject("deaths");
        BlueItems[i].ScoreTF    = BlueItems[i].InnerMovieClip.GetObject("score");
        BlueItems[i].NameTF     = BlueItems[i].InnerMovieClip.GetObject("name");
    		BlueItems[i].KillsTF    = BlueItems[i].InnerMovieClip.GetObject("kills");
    		BlueItems[i].FlagsTF    = BlueItems[i].InnerMovieClip.GetObject("flag");
    		BlueItems[i].FlagReturnTF = BlueItems[i].InnerMovieClip.GetObject("FlagReturn");
      }
    
      BlueHeaderMC = BlueTeamMC.GetObject("header");
    	//BlueHeaderMC.GetObject("header1").SetFloat("_z", 200);
      BlueScoreTF = BlueHeaderMC.GetObject("score").GetObject("textField");
      BlueTitleTF = BlueHeaderMC.GetObject("title").GetObject("textField");
    }
    
    /*
     * Cache references to MovieClips used for the Red Team.
     */
    function SetupRedTeam()
    {
      local byte i;    
      local ScoreRow sr;
      //local ASDisplayInfo dI;
    
      for (i = 0; i < 12; i++)
      {
        `log("Red team set up");
    		RedItems[i] = sr;
        RedItems[i].MovieClip = RedTeamMC.GetObject("item"$(i+1));
        RedItems[i].MovieClip.SetFloat("_z", 200);
    
    		// Give 50% Alpha blend to all rows.
    		// Non-empty rows will be corrected to 100% later.
        //dI = RedItems[i].MovieClip.GetDisplayInfo();
        //dI.Alpha = 50.0;
        //RedItems[i].MovieClip.SetDisplayInfo(dI);
    
        RedItems[i].InnerMovieClip = RedItems[i].MovieClip.GetObject("item_g");
        RedItems[i].DeathsTF   = RedItems[i].InnerMovieClip.GetObject("deaths");
        RedItems[i].ScoreTF    = RedItems[i].InnerMovieClip.GetObject("score");
        RedItems[i].NameTF     = RedItems[i].InnerMovieClip.GetObject("name");
    		RedItems[i].KillsTF    = RedItems[i].InnerMovieClip.GetObject("kills");
    		RedItems[i].FlagsTF    = RedItems[i].InnerMovieClip.GetObject("flag");
    		RedItems[i].FlagReturnTF = RedItems[i].InnerMovieClip.GetObject("FlagReturn");
      }
    
      RedHeaderMC = RedTeamMC.GetObject("header");
    	//RedHeaderMC.GetObject("header1").SetFloat("_z", 200);
      RedScoreTF = RedHeaderMC.GetObject("score").GetObject("textField");
      RedTitleTF = RedHeaderMC.GetObject("title").GetObject("textField");
    }
    
    
    /*
     * Initial setup of Scoreboard.
     */
    function Draw()
    {
      local UTGameReplicationInfo GRI;
    	local PlayerController PC;
    
    	PC = GetPC();
      if (PC != none)
    	{
        GRI = UTGameReplicationInfo(PC.WorldInfo.GRI);
    	}
    	//bTeamGame = UTGFxTeamHUDWrapper(PC.MyHUD) != None;
    	//bTeamGame = True;
    
    	//if ( !bTeamGame )
    	//{
    	//	RedTitleTF.SetText(Caps("<Strings:UTGameUI.JoinGame.Players>"));
    	//}
    
    	if ( GRI != None )
    	{
    		TitleTF.SetText(GRI.GameClass.default.GameName);
    		UpdateHeaders(GRI);
    		UpdatePreviousState(GRI);
    	}
    }
    
    /** 
      *  Make sure the PRI lists reflect current player state
      */
    function UpdatePRILists(UTGameReplicationInfo GRI)
    {
    	local int i, redPlayers, bluePlayers;
    	local UTPlayerReplicationInfo PRI;
    	local GFxObject NewPlayerRow;
    
    	redPlayers = 0;
    	bluePlayers = 0;
    
    	// Set up lists of Red/Blue players - each list only has 12 slots.
    	for ( i=0; i<GRI.PRIArray.Length; i++ )
    	{
    		PRI = UTPlayerReplicationInfo(GRI.PRIArray[i]);
    		
    		if ( PRI != none && IsValidScoreboardPlayer(PRI) )
    		{
    			NewPlayerRow = None;
    			//(PRI.Team == None) ||
    			if (  (PRI.Team.TeamIndex == RedTeamIndex) )
    			{
    				if ( !PRI.bOnlySpectator && (redPlayers < 12) )
    				{
    					NewPlayerRow = RedItems[redPlayers].MovieClip;
    					UpdateRow(RedItems[redPlayers], RedEntries[redPlayers], PRI);
    					`log("Update Row Red Called");
    					redPlayers++;
    				}
    			}
    			else if ( (PRI.Team.TeamIndex == BlueTeamIndex) && (bluePlayers < 12) )
    			{
    				NewPlayerRow = BlueItems[bluePlayers].MovieClip;
    				UpdateRow(BlueItems[bluePlayers], BlueEntries[bluePlayers], PRI);
    				`log("Update Row Blue Called");
    				bluePlayers++;
    			}
    			if ( PRI.IsLocalPlayerPRI() )
    			{
    				if ( PlayerRow != NewPlayerRow )
    				{
    					SetPlayerRow(NewPlayerRow);
    				}
    				//UpdateFooter(GRI, PRI, i);
    			}
    		}
    	}
    
    	// clear now empty rows
    	for ( i=RedPlayers; i<12; i++ )
    	{
    		if ( RedEntries[i].PlayerName != "" )
    		{
    			RedEntries[i].PlayerName = "";
    			ClearRow(RedItems[i]);
    		}
    	}
    
    	for ( i=BluePlayers; i<12; i++ )
    	{
    		if ( BlueEntries[i].PlayerName != "" )
    		{
    			BlueEntries[i].PlayerName = "";
    			ClearRow(BlueItems[i]);
    		}
    	}
    }
    
    /** 
      *  Clear all data displayed on scoreboard row ThisRow
      */
    
    function ClearRow(ScoreRow ThisRow)
    {
    	local ASDisplayInfo displayInfo;
    
    	displayInfo = ThisRow.MovieClip.GetDisplayInfo();
    	displayInfo.Alpha = 50.0;
    	ThisRow.MovieClip.SetDisplayInfo(displayInfo);
    	ThisRow.ScoreTF.SetText("");
    	ThisRow.DeathsTF.SetText("");
    	ThisRow.NameTF.SetString("htmlText", "");
    }
    
    
    /** 
      * Check if current and cached version of score info matches, if not update Flash UI.
      * Avoid updating Flash UI unnecessarily because of performance cost.
      * @PARAM ThisRow is the GFx object holding this row of scoreboard info
      * @PARAM ThisEntry is the cached info about the current settings of ThisRow
      * @PARAM ThisPRI is the PRI whose state needs to be reflected in ThisRow
      */
    function UpdateRow(ScoreRow ThisRow, out ScoreEntry ThisEntry, UTPlayerReplicationInfo ThisPRI)
    {
    	local ASDisplayInfo displayInfo;
    	local bool bUpdateItemRenderer;		
    	local String NameAndFlagText;
    	//local array<ASValue> args;
    	
    	bUpdateItemRenderer = false;	
    
    	// update row if it has changed
    	if ( (ThisPRI.PlayerName != ThisEntry.PlayerName) || (ThisPRI.bHasFlag != ThisEntry.bHasFlag) )
    	{
    		if ( ThisEntry.PlayerName == "" )
    		{
    			// need to initialize the row's displayinfo since wasn't displayed
    			displayInfo = thisRow.MovieClip.GetDisplayInfo();
    			displayInfo.Alpha = 100.0;
    			ThisRow.MovieClip.SetDisplayInfo(displayInfo);
    
    			// force update score and deaths (so 0s will be displayed)
    			ThisRow.ScoreTF.SetText(string(int(ThisPRI.Score)));
    			ThisEntry.PlayerScore = ThisPRI.Score;
    			ThisRow.DeathsTF.SetText(string(ThisPRI.Deaths));
    			ThisEntry.PlayerDeaths = ThisPRI.Deaths;
    			ThisRow.KillsTF.SetText(string(ThisPRI.KillCount));
    			ThisEntry.PlayerKills = ThisPRI.KillCount;
    			ThisRow.FlagsTF.SetText(string(ThisPRI.FlagCaptureCount));
    			ThisEntry.PlayerFlags = ThisPRI.FlagCaptureCount;
    			ThisRow.FlagReturnTF.SetText(string(ThisPRI.FlagReturnCount));
    			ThisEntry.PlayerFlagReturn = ThisPRI.FlagReturnCount;
    			`log("Force update score & deaths");
    		}
    
    		NameAndFlagText = "";
    		//if (ThisPRI.bHasFlag)
    		//{
    		//	NameAndFlagText $= "<img src=\"flag_noglow\">&nbsp;";
    		//}		
    
    		NameAndFlagText $= ThisPRI.PlayerName;
    		//NameAndFlagText $= LocalPlayerPRI.PlayerName;
    		ThisEntry.PlayerName = ThisPRI.PlayerName;
    		//`log(NameAndFlagText);
    		//`log(ThisEntry.PlayerName);
    		//`log(ThisPRI.PlayerName);
    		`log("Name Updated");
    		//ThisEntry.PlayerName = LocalPlayerPRI.PlayerName
    		ThisEntry.bHasFlag = ThisPRI.bHasFlag;
    		bUpdateItemRenderer = true;
    	}
    	if ( ThisPRI.Score != ThisEntry.PlayerScore )
    	{		
    		ThisEntry.PlayerScore = ThisPRI.Score;
    		bUpdateItemRenderer = true;
    		`log("Score Updated");
    	}
    	if ( ThisPRI.Deaths != ThisEntry.PlayerDeaths )
    	{			
    		ThisEntry.PlayerDeaths = ThisPRI.Deaths;
    		bUpdateItemRenderer = true;
    		`log("Death Updated");
    	}
    
    	if ( ThisPRI.KillCount != ThisEntry.PlayerKills )
    	{			
    		ThisEntry.PlayerKills = ThisPRI.KillCount;
    		bUpdateItemRenderer = true;
    		`log("Kills Updated");
    	}
    	
    	if ( ThisPRI.FlagCaptureCount != ThisEntry.PlayerFlags )
    	{			
    		ThisEntry.PlayerFlags = ThisPRI.FlagCaptureCount;
    		bUpdateItemRenderer = true;
    		`log("Flag Capture Updated");
    	}
    	
    	if ( ThisPRI.FlagReturnCount != ThisEntry.PlayerFlags )
    	{			
    		ThisEntry.PlayerFlagReturn = ThisPRI.FlagReturnCount;
    		bUpdateItemRenderer = true;
    		`log("Flag Return Updated");
    	}
    
    	if (bUpdateItemRenderer)
    	{	
    		//args.length = 0;
    		ThisRow.InnerMovieClip.SetString("PlayerName", NameAndFlagText);
    		ThisRow.InnerMovieClip.SetString("PlayerScore", String(ThisEntry.PlayerScore));
    		ThisRow.InnerMovieClip.SetString("PlayerDeaths", String(ThisEntry.PlayerDeaths));
    		ThisRow.InnerMovieClip.SetString("PlayerKills", String(ThisEntry.PlayerKills));
    		ThisRow.InnerMovieClip.SetString("PlayerFlags", String(ThisEntry.PlayerFlags));
    		ThisRow.InnerMovieClip.SetString("PlayerFlagReturn", String(ThisEntry.PlayerFlagReturn));
    		//ThisRow.InnerMovieClip.Invoke("UpdateAfterStateChange", args);	
    		ThisRow.InnerMovieClip.ActionScriptVoid("UpdateAfterStateChange2");
    		`log("Strings Updated");
    	}
    }
    
    function Tick(Float DeltaTime)
    {
    	local UTGameReplicationInfo GRI;
    
    	GRI = UTGameReplicationInfo(GetPC().WorldInfo.GRI);
    	if ( GRI != None )
    	{
    		UpdatePRILists(GRI);
    		UpdateHeaders(GRI);
    		UpdatePreviousState(GRI);	
    	}
    
    	super.Tick(DeltaTime);
    }
    
    /*
     * Manage this player's row. The this row will have a 3D Tween
     * and yellow text. Revert the previous player's row to default 
     * if necessary.
     */
    function SetPlayerRow(GFxObject UpdatedPlayerRow)
    {
      if (PlayerRow != none)
      {
        ClearsTweensOnMovieClip(PlayerRow);
    		PlayerRow.SetFloat("_z", 200); // Force the Z change if the TweenManager refuses to behave.
        PlayerRow.GetObject("item_g").GotoAndStop("default");
      }
    	PlayerRow = UpdatedPlayerRow;
    
    	if ( PlayerRow != None )
    	{
    		TweenPlayerRow(UpdatedPlayerRow);
    		PlayerRow.GetObject("item_g").GotoAndStop("player");
    	}
    }
    
    /*
     * Store the current Game State. Data is used for checking if an update
     * to the view is necessary.
     */
    function UpdatePreviousState(UTGameReplicationInfo GRI)
    {
      PreviousState.RemainingTime = GRI.RemainingTime;  	
    	//bTeamGame = True;
     // if (bTeamGame)
      //{
    		PreviousState.RedScore = GRI.Teams[RedTeamIndex].Score;
        PreviousState.BlueScore = GRI.Teams[BlueTeamIndex].Score;
      //}
    }
    
    static function string FormatTime(int Seconds)
    {
    	local int Hours, Mins;
    	local string NewTimeString;
    
    	Hours = Seconds / 3600;
    	Seconds -= Hours * 3600;
    	Mins = Seconds / 60;
    	Seconds -= Mins * 60;
    	if (Hours > 0)
    		NewTimeString = ( Hours > 9 ? String(Hours) : "0"$String(Hours)) $ ":";
    	NewTimeString = NewTimeString $ ( Mins > 9 ? String(Mins) : "0"$String(Mins)) $ ":";
    	NewTimeString = NewTimeString $ ( Seconds > 9 ? String(Seconds) : "0"$String(Seconds));
    
    	return NewTimeString;
    }
    
    /*
     * Updates the following text fields:
     *      Red Team's Score
     *      Blue Team's Score
     *      Remaining Time
     */
    function UpdateHeaders(UTGameReplicationInfo GRI)
    {
      //if (bTeamGame)
      //{
    		if (PreviousState.RedScore != GRI.Teams[RedTeamIndex].Score)
    			RedScoreTF.SetText(Min(GRI.Teams[RedTeamIndex].Score, 9999));
    
        if (PreviousState.BlueScore != GRI.Teams[BlueTeamIndex].Score)
          BlueScoreTF.SetText(Min(GRI.Teams[BlueTeamIndex].Score, 9999));
      //}
    
      if (GRI.RemainingTime != PreviousState.RemainingTime)
      	TimeTF.SetText(FormatTime(GRI.TimeLimit != 0 ? GRI.RemainingTime : GRI.ElapsedTime));
    }
    
    /*
     * Updates the footer with information relevant to the player.
     */
    function UpdateFooter(UTGameReplicationInfo GRI, UTPlayerReplicationInfo LocalPlayerPRI, optional byte PRIIndex)
    {	
    	/**
    	local byte PlayerRelRank;
    	local byte PlayerTeamIndex;
    
    	// Discover the place.
    	if (!bTeamGame)
    	{
    		// If it's a deathmatch, the player's index in the array is equivalent to his placement.
    		PlayerRelRank = PRIIndex+1;
    	}
    	else 
    	{
    		// If it's a team game, check if the player's team is winning.
    		PlayerTeamIndex = LocalPlayerPRI.GetTeamNum();	
    		if (GRI.Teams[RedTeamIndex].Score > GRI.Teams[BlueTeamIndex].Score && PlayerTeamIndex == RedTeamIndex)
    		{
    			PlayerRelRank = 1;
    		}
    		else 
    		{
    			PlayerRelRank = 2;
    		}
    	}
    
    	// Update the footer as necessary.
    	if (PreviousState.PlayerPlace != PlayerRelRank)
    	{
    		Footer_PlaceTF.SetText(String(PlayerRelRank));	
    	}
    	if (PreviousState.PlayerScore != LocalPlayerPRI.Score)
    	{
    		Footer_ScoreTF.SetText(String(int(LocalPlayerPRI.Score)));
    	}
    	if (PreviousState.PlayerName != LocalPlayerPRI.PlayerName)
    	{
    		Footer_NameTF.SetText(LocalPlayerPRI.PlayerName);	
    	}	
    	if (PreviousState.PlayerDeaths != LocalPlayerPRI.Deaths)
    	{
    		Footer_DeathsTF.SetText(String(LocalPlayerPRI.Deaths));			
    	}
    
    	// Update the previous state for the player. Left here for time's sake.
    	PreviousState.PlayerName = LocalPlayerPRI.PlayerName;
    	PreviousState.PlayerScore = int(LocalPlayerPRI.Score);
    	PreviousState.PlayerDeaths = LocalPlayerPRI.Deaths;	
    	PreviousState.PlayerPlace = PlayerRelRank;
    	*/
    }
    
    /* 
     * Tween for constant _xrotation of Scoreboard. 
     */
     
    
    function FloatScoreboardAnimationX(bool direction)
    {
        /**
    	if (direction)
            TweenTo(ScoreboardMC, 5.0, "_xrotation", 4, TWEEN_Linear, "FloatScoreboard1");
        else
            TweenTo(ScoreboardMC, 5.0, "_xrotation", -4, TWEEN_Linear, "FloatScoreboard2");
    	*/
    }
    
    /* 
     * Tween for constant _yrotation of Scoreboard.
     */
     
    
    function FloatScoreboardAnimationY(bool direction)
    {
       /**
       if (direction)
            TweenTo(ScoreboardMC, 7.0, "_yrotation", 7.0, TWEEN_Linear, "FloatScoreboard3");
        else
            TweenTo(ScoreboardMC, 7.0, "_yrotation", -7.0, TWEEN_Linear, "FloatScoreboard4");
    	*/
    }
    
    /* 
     * Z tween for the player's row.
     */
    
    function TweenPlayerRow(GFxObject RowMC)
    {
       /**
       if (bPlayerRowTween)
           TweenTo(RowMC, 1.5, "_z", -450, TWEEN_Linear, "TweenPlayerRow");
        else
           TweenTo(RowMC, 1.5, "_z", 0, TWEEN_Linear, "TweenPlayerRow");
    
        bPlayerRowTween = !bPlayerRowTween;
    	*/
    }
    
    /*
     * Callback processor for TweenManager. Interface from UTGFxTweenableMoviePlayer.
     */
     
    
    function ProcessTweenCallback(String Callback, GFxObject TargetMC)
    {
         /**
    	 switch(Callback)
         {
            case ("TweenPlayerRow"):
                TweenPlayerRow(TargetMC);
            break;
            case ("FloatScoreboard1"):
                FloatScoreboardAnimationX(false);
            break;
            case ("FloatScoreboard2"):
                FloatScoreboardAnimationX(true);
            break;
            case ("FloatScoreboard3"):
                FloatScoreboardAnimationY(false);
            break;
            case ("FloatScoreboard4"):
                FloatScoreboardAnimationY(true);
            break;
            default:
            break;
         }
    	 */
    }
    
    
    /**
     * Tests a PRI to see if we should display it on the scoreboard
     *
     * @Param PRI		The PRI to test
     * @returns TRUE if we should display it, returns FALSE if we shouldn't
     */
    function bool IsValidScoreboardPlayer( UTPlayerReplicationInfo PRI)
    {
    	if ( !PRI.bIsInactive && PRI.WorldInfo.NetMode != NM_Client &&
    		(PRI.Owner == None || (PlayerController(PRI.Owner) != None && PlayerController(PRI.Owner).Player == None)) )
    	{
    		return false;
    	}
    
    	return true;
    }
    
    /**
     * Returns the time online as a string
     */
    function string GetTimeOnline(UTPlayerReplicationInfo PRI)
    {
    	return ""@ class'UTHUD'.static.FormatTime( PRI.WorldInfo.GRI.ElapsedTime );
    }
    
    defaultproperties
    {
      BlueTeamIndex = 1
      RedTeamIndex = 0
      bPlayerRowTween = false
    
      bDisplayWithHudOff=TRUE
      bEnableGammaCorrection=FALSE
      bTeamGame=TRUE
    	MovieInfo=SwfMovie'PHHUD.PH_Scoreboard'
    }

    These are the logs when when I first open the scoreboard in the game:
    Code:
    [0039.01] Warning: Warning, Failed to load 'Font None.Arial': Failed to find object 'Font None.Arial'
    [0039.02] Warning: Warning, Failed to load 'Font None.Arial': Failed to find object 'Font None.Arial'
    [0039.02] Warning: Warning, Failed to load 'Font None.Arial': Failed to find object 'Font None.Arial'
    [0039.02] Warning: Warning, Failed to load 'SwfMovie ?INT?Scaleform.IME.MoviePath?': Failed to find object 'SwfMovie ?INT?Scaleform.IME.MoviePath?'
    [0039.02] Log: GFx attempted to load missing object [?INT?Scaleform.IME.MoviePath?]
    [0039.02] ScriptLog: Config scoreboard called
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Red team set up
    [0039.02] ScriptLog: Blue team set up
    [0039.02] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptLog: Blue team set up
    [0039.03] ScriptWarning: Accessed None 'RBotMC'
    	PHGFxHUD Transient.PHGFxHUD_0
    	Function ProjectHovercraft.PHGFxHUD:ToggleCrosshair:00CC
    [0039.04] ScriptWarning: Accessed None 'RLeftMC'
    	PHGFxHUD Transient.PHGFxHUD_0
    	Function ProjectHovercraft.PHGFxHUD:ToggleCrosshair:011E
    [0039.04] ScriptWarning: Accessed None 'RRightMC'
    	PHGFxHUD Transient.PHGFxHUD_0
    	Function ProjectHovercraft.PHGFxHUD:ToggleCrosshair:0147
    [0039.04] Warning: Warning, Failed to load 'Font None.Arial': Failed to find object 'Font None.Arial'
    [0039.04] ScriptLog: Force update score & deaths
    [0039.04] ScriptLog: Name Updated
    [0039.04] ScriptLog: Strings Updated
    [0039.04] ScriptLog: Update Row Red Called
    [0039.04] ScriptLog: Force update score & deaths
    [0039.04] ScriptLog: Name Updated
    [0039.04] ScriptLog: Strings Updated
    [0039.05] ScriptLog: Update Row Blue Called
    [0039.05] ScriptLog: Force update score & deaths
    [0039.05] ScriptLog: Name Updated
    [0039.05] ScriptLog: Strings Updated
    [0039.05] ScriptLog: Update Row Blue Called
    [0039.05] ScriptLog: Force update score & deaths
    [0039.05] ScriptLog: Name Updated
    [0039.05] ScriptLog: Strings Updated
    [0039.05] ScriptLog: Update Row Red Called
    [0039.05] ScriptLog: Force update score & deaths
    [0039.05] ScriptLog: Name Updated
    [0039.05] ScriptLog: Strings Updated
    [0039.05] ScriptLog: Update Row Blue Called
    [0039.05] ScriptLog: Force update score & deaths
    [0039.05] ScriptLog: Name Updated
    [0039.05] ScriptLog: Strings Updated
    [0039.05] ScriptLog: Update Row Red Called
    [0039.05] ScriptLog: Force update score & deaths
    [0039.05] ScriptLog: Name Updated
    [0039.05] ScriptLog: Strings Updated
    [0039.05] ScriptLog: Update Row Blue Called
    [0039.06] ScriptLog: Force update score & deaths
    [0039.06] ScriptLog: Name Updated
    [0039.06] ScriptLog: Strings Updated
    [0039.06] ScriptLog: Update Row Red Called
    [0039.06] ScriptLog: Force update score & deaths
    [0039.06] ScriptLog: Name Updated
    [0039.06] ScriptLog: Strings Updated
    [0039.06] ScriptLog: Update Row Blue Called
    [0039.06] ScriptLog: Force update score & deaths
    [0039.06] ScriptLog: Name Updated
    [0039.06] ScriptLog: Strings Updated
    [0039.06] ScriptLog: Update Row Red Called
    [0039.06] ScriptLog: Force update score & deaths
    [0039.06] ScriptLog: Name Updated
    [0039.06] ScriptLog: Strings Updated
    [0039.06] ScriptLog: Update Row Blue Called
    [0039.07] ScriptLog: Update Row Red Called
    [0039.07] ScriptLog: Update Row Blue Called
    [0039.07] ScriptLog: Update Row Blue Called
    [0039.07] ScriptLog: Update Row Red Called
    [0039.07] ScriptLog: Update Row Blue Called
    [0039.07] ScriptLog: Update Row Red Called
    [0039.07] ScriptLog: Update Row Blue Called
    [0039.07] ScriptLog: Update Row Red Called
    [0039.07] ScriptLog: Update Row Blue Called
    [0039.07] ScriptLog: Update Row Red Called
    [0039.07] ScriptLog: Update Row Blue Called
    
    //etc etc with Update Row `log
    This is what happens if you let the game run for a while, and let the score change a bit.

    Code:
    [0055.74] Warning: Warning, Failed to load 'Font None.Arial': Failed to find object 'Font None.Arial'
    [0055.74] Warning: Warning, Failed to load 'Font None.Arial': Failed to find object 'Font None.Arial'
    [0055.74] ScriptLog: Name Updated
    [0055.74] ScriptLog: Score Updated
    [0055.74] ScriptLog: Strings Updated
    [0055.74] ScriptLog: Update Row Red Called
    [0055.74] ScriptLog: Name Updated
    [0055.75] ScriptLog: Strings Updated
    [0055.75] ScriptLog: Update Row Red Called
    [0055.75] ScriptLog: Name Updated
    [0055.75] ScriptLog: Score Updated
    [0055.75] ScriptLog: Death Updated
    [0055.75] ScriptLog: Strings Updated
    [0055.75] ScriptLog: Update Row Blue Called
    [0055.75] ScriptLog: Name Updated
    [0055.75] ScriptLog: Strings Updated
    [0055.75] ScriptLog: Update Row Blue Called
    [0055.75] ScriptLog: Update Row Blue Called
    [0055.76] ScriptLog: Death Updated
    [0055.76] ScriptLog: Strings Updated
    [0055.76] ScriptLog: Update Row Red Called
    [0055.76] ScriptLog: Update Row Blue Called
    [0055.76] ScriptLog: Update Row Red Called
    [0055.76] ScriptLog: Score Updated
    [0055.76] ScriptLog: Death Updated
    [0055.76] ScriptLog: Strings Updated
    [0055.76] ScriptLog: Update Row Blue Called
    [0055.76] ScriptLog: Update Row Red Called
    [0055.77] ScriptLog: Score Updated
    [0055.77] ScriptLog: Kills Updated
    [0055.77] ScriptLog: Strings Updated
    [0055.77] ScriptLog: Update Row Blue Called
    [0055.77] ScriptLog: Update Row Red Called
    [0055.77] ScriptLog: Update Row Red Called
    [0055.77] ScriptLog: Update Row Blue Called
    [0055.77] ScriptLog: Update Row Blue Called
    [0055.77] ScriptLog: Update Row Blue Called
    [0055.77] ScriptLog: Update Row Red Called
    [0055.78] ScriptLog: Update Row Blue Called
    [0055.78] ScriptLog: Update Row Red Called
    [0055.78] ScriptLog: Update Row Blue Called
    [0055.78] ScriptLog: Update Row Red Called
    [0055.78] ScriptLog: Update Row Blue Called
    [0055.79] ScriptLog: Update Row Red Called
    
    //etc etc
    And this is the actual flash file:

    https://docs.google.com/open?id=0B8U...OWRRVUl2dHhzUQ

    Any help would be amazing, this has been driving me crazy for ages!!

    Thankyou!

    #2
    Update:

    So I have discovered something really strange, but I think that I may be onto something.

    If I change my SetUpRedTeam function that is inside of PHGFxUIScoreboard to this:

    Code:
    function SetupRedTeam()
    {
      local byte i;    
      local ScoreRow sr;
      local ASDisplayInfo dI;
    
    
      for (i = 0; i < 12; i++)
      {
        `log("Red team set up");
        RedItems[i] = sr;
        RedItems[i].MovieClip = RedTeamMC.GetObject("item"$(i+1));
        RedItems[i].MovieClip.SetFloat("_z", 200);
    
        RedItems[i].InnerMovieClip = RedItems[i].MovieClip.GetObject("item_g");
        RedItems[i].DeathsTF   = RedItems[i].InnerMovieClip.GetObject("deaths");
        RedItems[i].ScoreTF    = RedItems[i].InnerMovieClip.GetObject("score");
        RedItems[i].NameTF     = RedItems[i].InnerMovieClip.GetObject("name");
        RedItems[i].KillsTF    = RedItems[i].InnerMovieClip.GetObject("kills");
        RedItems[i].FlagsTF    = RedItems[i].InnerMovieClip.GetObject("flag");
        RedItems[i].FlagReturnTF = RedItems[i].InnerMovieClip.GetObject("FlagReturn");
        RedItems[i].HideTF = RedItems[i].InnerMovieClip.GetObject("Hide");
         
        ////////////////////////////////////////////////////////ADDED CODE/////////////////////////	
    
        dI = RedItems[i].DeathsTF.GetDisplayInfo();
        dI.x = 2000000;
        dI.y = 2000000;
        RedItems[i].DeathsTF.SetDisplayInfo(dI);
    
        ////////////////////////////////////////////////////////////////////////////////////////////
    		
      }
    
      RedHeaderMC = RedTeamMC.GetObject("header");
      RedScoreTF = RedHeaderMC.GetObject("score").GetObject("textField");
      RedTitleTF = RedHeaderMC.GetObject("title").GetObject("textField");
    	
    	
    }
    It works perfectly!!! Except for having shifted my DeathsTF where no one can see it, also along with this being a terrible hacky fix :/

    It also seems that it only seems to do this if I change the x and y coordinates to such massive extremes, if I change them to say 200 by 200 this effect doesn't happen.

    Anyone have any idea why doing this has such an impact?

    Thanks

    Comment

    Working...
    X