Results 1 to 10 of 10

Thread: Canvas issue

  1. #1
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default Canvas issue

    So I haven't used canvas for about a year, in the septemper 2010 build, and I am looking to do something similar in my current build.

    However, I can't seem to get it to run the HUD class.
    I've logged it, it does not run my HUD class's DrawHud function at all, so I am guessing it never runs the class in the first place.

    I have set this in my GameInfo:
    Code:
     HUDType=class'SMGame.SMHud'
    My gameinfo extends GameInfo rather than UTGame, so bUseClassicHUD=true isn't a valid property here.
    Though I believe what that bool usually does is swap from scaleform to canvas?

    Do I still have to make it do that in some way? (If so I am guessing it's still trying to run a scaleform hud and ignoring Canvas) The UDN only uses UTGame as an example.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  2. #2
    Prisoner 849
    Join Date
    Jan 2010
    Posts
    898

    Default

    the framework i'm using is based on UT classes so i'm not sure.

    you could try logging your DrawHUD function, though i mostly use PostRender().

  3. #3
    Banned
    Join Date
    Feb 2011
    Location
    BXL/Paris
    Posts
    2,169

    Default

    ClientSetHUD is called from GameInfo - you can setup hud there.

  4. #4
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    ClientSetHUD uses the HUDType variable, which what I have set in my default properties.

    Quote Originally Posted by thommie View Post
    the framework i'm using is based on UT classes so i'm not sure.

    you could try logging your DrawHUD function, though i mostly use PostRender().
    As I said in the first post, I have, it never executes.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  5. #5
    Prisoner 849
    Join Date
    Jan 2010
    Posts
    898

    Default

    ah, i should take more time to read things in the morning

    i'll try something tomorrow, to see if i have the same problem, and how it can be solved.

  6. #6
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    Any ideas, anyone?
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  7. #7
    MSgt. Shooter Person
    Join Date
    Feb 2010
    Location
    Middle England
    Posts
    174

    Default

    Quote Originally Posted by Graylord View Post
    Any ideas, anyone?
    I have the same HUD problem which I also had with my gametype itself not being processed.

    GameType solved below: (with help from Hourence and MagicStudios clues code: http://www.magicstonestudios.com/tut.../essential.php )

    Code:
    class KFSMGame extends UTGame
    	config(Game);
    
    static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
    	{
    		return class'KFSMGame';
    	}
    
    
    defaultproperties
    {
    	PlayerControllerClass=class'KFSMPlayerController'
    	DefaultPawnClass=class'KFSMPawn'
            HUDType=Class'KFSMHud'
    	bUseClassicHud=true
    	Name="Default__KFSMGame"
    }
    ( using classic hud until it's solved, but I guess I'd sooner go the Scaleform way if/when it's other than sandbox)

    so I'm thinking similar code will point to the custom HUD, and along the lines of VendorX' contribution, who seems like an expert.

    Edit: http://udkc.info/index.php?title=Tut...hout_Scaleform

    Works ok for me.
    Last edited by Snipe34; 03-25-2012 at 09:15 PM.

  8. #8
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    I'm afraid that doesn't help my case, it get's my gametypes fine, and I am extending gameinfo and not UTGame, so there's no bUseClassicHud.

    The last link doesn't really set things up differently.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.

  9. #9
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,264

    Default

    This works for me.

    Code:
    class SBGame extends GameInfo;
    
    DefaultProperties
    {
        PlayerControllerClass = class'Sandbox.SBPlayerController'
        DefaultPawnClass = class'Sandbox.SBPawn'
        HUDType = class'Sandbox.SBHUD'
    }
    Code:
    class SBHUD extends HUD;
    
    function DrawHUD()
    {
        super.DrawHUD();
        `logd("Hello, World!");
    }
    Are you sure it's not something else? Have you overridden the PostRender event that calls DrawHUD?

  10. #10
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,479

    Default

    Ah I see, I was not aware it was DrawHud rather than DrawGameHud when extending from higher up the hierarchy.

    Thanks for the example!
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.