Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Beginner basics requested here, While i'm familiar with the basics of OOP programming i've just started looking as UnrealScript for a game i had made in the UDK editor up to now.

I have a class that extends UTHUD and another that extends UDKPAWN. I have the pawn destroyed when its been shot 3 times and some basic helloworld text displaying in my HUD but i'm completely lost as to how one would get some sort of feedback between the two classes going on?

What i would like to do to start off, is have some text that says something like "Amount of baddies killed: 0" Displayed on the HUD which would then increment each time the player destroyed one of my pawns.

I'm sorry if this is an inappropriate question but i've never really worked within a framework like this before and wasn't sure where to go for help to get my footing. All advice appreciated!

share|improve this question
up vote 0 down vote accepted

First i created my own class that extended UTPlayerReplicationInfo and had a variable baddiesKilled.

Then in my game type class i added this line to default properties:

PlayerReplicationInfoClass = class'myPlayerReplicationInfo'

Then in the HUD class:

function DrawGameHud()
local myPlayerReplicationInfo PRI;

PRI = myPlayerReplicationInfo(PawnOwner.PlayerReplicationInfo);

Canvas.Font = class'Engine'.static.GetLargeFont();
Canvas.DrawText("Baddies Killed=" + PRI.baddiesKilled);


Hope someone finds this useful.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.