Coding the Creature: Textures over Pawn Head

Hello everyone, Pol again writing here! 🙂

The second post about programming is very simple and short but quite useful for many people programming in unrealscript (and, unrealscript oriented, this probably won’t help you if you are working on other programming lenguage), it explains how to put textures over the pawn head (and obviously extrapolable to put textures in the hud wherever you want).


In the UDK forums i’ve seen many people asking the same, if there is a way to put text/images over the pawn or over an enemy head. It’s pretty easy to do this. In our game, we have to put tooltips over the pawn head when it approaches to a key area, so, in HUD we draw it.

There is another trick we use in our game, that is to put a volume, that indicates if the texture should be drawed or not, and looking at the boolean created for this puropose, we can see it easly.

The result is the following

So, in HUD class, in the DrawHUD function:

1 if(TCPawn(PlayerOwner.Pawn).ToolTip==true){//check if we have to draw the texture
2 Canvas.DrawColor = MakeColor(100,255,100,255);
3 //print the message over the Pawn head
4 Canvas.SetPos( PlayerOwner.Location.Y + 36, PlayerOwner.Location.Z +130);
5 Canvas.DrawTexture(Texture2D'CriaturaPackage_Pol.ToolTips.Tooltip_W_low' , 0.5);
6 }

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: