UnrealScript Game Programming Cookbook

(Chris Devlin) #1

HUD


196


  1. We now have a fully functioning HUD that displays our health bar in the
    top-left corner! There's still one last step, however. We need to tell our game
    to use our new HUD. In our TutorialGame class, add the following code in
    the DefaultProperties block:


DefaultProperties
{
HUDType=class'Tutorial.TutorialHUD'
}

Notice how our bar changes to a red color when our health is dangerously low.
You can also now see the first bar drawn, which illustrates the maximum capacity
for our hit points.
Free download pdf