Announcement

Collapse
No announcement yet.

New Problem HUD

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

    New Problem HUD

    Heres the problem I have created custom game type and linked it to that HUD image I want to load. The code compiles fine and I can choose the gametype in instant action. The problem is the HUD dosnt show up once in the game.


    Here is the code:

    HUD Code:
    Code:
    class SerenityAHUD extends HudBase;
    
    #exec TEXTURE IMPORT NAME=pHUD FILE=..\Textures\AlianceBase.tga GROUP="HUD" MIPS=OFF FLAGS=2
    
    var texture T;
    
    simulated event PostRender( canvas Canvas )
    {
        Super.PostRender(Canvas);
        //if (Level.TimeSeconds < 25.5)
        RenderScreenshot(Canvas);
    }
    
    function RenderScreenshot( Canvas C )
    {
       local float XWidth, YHeight, XMod, YMod;
    
    
       XMod = 100;
       YMod = 100;
    
       //Reset the Canvas in case the rendering mode has been changed
       C.Reset();
       C.SetPos(0,0);
       C.DrawTile(T, XMod, YMod, 0, 0, t.USize, t.VSize );
    
    }
    
    defaultproperties
    {
       T=Texture'pHUD'
    }
    Here is my Game Type
    Code:
    class CustomDM extends xDeathmatch;
    
    
    defaultproperties
    {
    bAllowTrans=True
    InitialBots=8
    HUDType="CustomDM.SerenityAHUD"
    MapPrefix="DM"
    Description="HUD TESTING!"
    }

    Thanks in advance

    #2
    Try logging, see if the functions are called.

    Comment


      #3
      I looked in the log UT2004.log and found that it can find the package.

      Warning: Failed to load 'CustomDM': Can't find file for package 'CustomDM'
      Warning: Failed to load 'Class CustomDM.SerenityAHUD': Can't find file for package 'CustomDM'

      Comment


        #4
        The package name was not CustomDM. CustomDM was the class name of the gametype.

        Comment

        Working...
        X