UE3 - UT3 HUD display problem

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

C0b0ll

New Member
Aug 31, 2010
3
0
0
Hi,

I try to display a HUD for my mod but it doesn't work...
What is wrong in my code ?

My HUD class :
Code:
class k6HUD extends UTHUD;
function DrawLivingHud()
{
	super.DrawLivingHud();
	DrawK6LivingHud();
}

function DrawK6LivingHud()
{
	DrawGlowText("HelloWorld", 10, 100, 60);
}

DefaultProperties
{
}

My game class :
Code:
 class k6o extends UTGame;
 
 defaultproperties
{
    bScoreDeaths=true

    bIgnoreTeamForVoiceChat=true

    bGivePhysicsGun=false
    bDelayedStart=false

    PlayerControllerClass=class'k6online.k6PlayerController'
    DefaultPawnClass=class'k6online.k6Pawn'
    HUDType=class'k6online.k6HUD'

    DefaultInventory(0)=class'UTWeap_ShockRifle'
}

Thanks a lot :).

C0b0ll
 

C0b0ll

New Member
Aug 31, 2010
3
0
0
Hi,
Thanks for your answer :).

With the line "bUseClassicHUD = true;" in defaultproperties of my gameclass, my log message is logged. But my text "K6Text" isn't displayed during the game. I have a hud like "6:69"

This is my code
HUD :
Code:
class k6HUD extends UTHUD;

simulated function PostBeginPlay()
{
	`log("K6HUD");
}

function DrawLivingHud()
{
	super.DrawLivingHud();
	DrawK6LivingHud();
}

function DrawK6LivingHud()
{
	DrawGlowText("K6Text: 69", 10, 100, 60);
}

DefaultProperties
{
}

My game class :
Code:
 class k6o extends UTGame;
 
 defaultproperties
{
    bScoreDeaths=true

    bIgnoreTeamForVoiceChat=true
    bGivePhysicsGun=false
    bDelayedStart=false

    PlayerControllerClass=class'k6online.k6PlayerController'
    DefaultPawnClass=class'k6online.k6Pawn'
    HUDType=class'k6online.k6HUD'
    bUseClassicHUD = true;

    DefaultInventory(0)=class'UTWeap_ShockRifle'
}
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
I suppose you do run around as regular player in some map? As the name already suggests, DrawLivingHud() is only called if the local player is alive, as opposed to being dead or spectating.
 

C0b0ll

New Member
Aug 31, 2010
3
0
0
It works with the line "bUseClassicHUD = true;".
The 6:69 come from "DrawGlowText("K6Text: 69", 10, 100, 60);" without letters ;).

Thx a lot :)