Results 1 to 5 of 5
  1. #1
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Mexico City
    Posts
    96

    Default Cannot override HUD

    Hello

    I'm kind of stuck with my code, i managed to create a third person camera I actually like, but i cannot override the HUD

    I'm trying to override my HUD in my PlayerController that extends UTPLayerController by overriding

    Code:
    /* This code comes from UDN, i need to update it later to draw what I want */
    function DrawHUD( HUD H )
    {
    	local float CrosshairSize;
    	super.DrawHUD(H);
    
    	H.Canvas.SetDrawColor(0,255,0,255);
    
    	CrosshairSize = 4;
    
    	H.Canvas.SetPos(H.CenterX - CrosshairSize, H.CenterY);
    	H.Canvas.DrawRect(2*CrosshairSize + 1, 1);
    
    	H.Canvas.SetPos(H.CenterX, H.CenterY - CrosshairSize);
    	H.Canvas.DrawRect(1, 2*CrosshairSize + 1);
    }
    It doesn't matters if I remove

    Code:
    super.DrawHUD(H);
    But it still draws with the standar one, any ideas?

    Thanks in advanced

  2. #2
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Posts
    234
    Gamer IDs

    Gamertag: Splatsmear

    Default

    As I understand it, You can(should) only draw on/update the HUD.canvas during the PostRender() event in an extended HUD class. I am not sure it is possible from within the controller class.

  3. #3
    Veteran
    Join Date
    Dec 2003
    Location
    Finland
    Posts
    5,996

    Default

    HUDs are set in the gametype code. Check the default properties of GameInfo for instance.
    Also known as Rask — http://www.ottorask.com/

    UT3 Levels: CTF-Austere (MSU P3 5th place)
    UE3 Tutorials: From Textures To Materials In UE3 Complex Fire In UE3

  4. #4
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Mexico City
    Posts
    96

    Default

    Ok, so when i create my Custom HUD by extending the HUD class i have to load it using, defaultproperties in my GameType just the way i load my character controller?

    Quote Originally Posted by musilowski View Post
    HUDs are set in the gametype code. Check the default properties of GameInfo for instance.
    Just to save a little work xD, can you tell me what property you i should set?

  5. #5
    MSgt. Shooter Person
    Join Date
    Jan 2008
    Location
    Between the chair and monitor
    Posts
    180

    Default

    HUDType=class'YourPackage.YourHUD'
    Specs: TI99/4A
    CPU: TI TMS9900 3.0 MHz 16-bit | Memory: 256 bytes + 32 KB Expansion card | Video: TI TMS9918A VDP 16 KB VRAM | Storage: Data Storage Cassette Drive | Monitor: 13" Zenith Color TV via RF Modulator


 

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.