Tutorial: Scaleform HUD

March 20, 2013
/ / /

EDIT:  8/24/2015

Due to some changes in our services with Google Drive, I no longer have access to the presentation file that originally formed this tutorial. Luckily, the three videos involved still remain on our YouTube channel and are now embedded on this page. I’ve also recovered the UnrealScript classes via Pastebin, which are now linked below.

Below you’ll find a new tutorial for creating a working Scaleform HUD. I recently began working on this HUD project, and during my research I came across a number of tutorials that were of exceptional quality, but a bit outdated. Many of the tutorials I found were a few years old at best, operating on deprecated code from previous builds of UDK. It took a few hours of research to figure out how to make it the UnrealScript work with a more current version of UDK. During that research I found a few threads on this very forum where other people had run into the same issue, so I figured I’d shoot a couple quick videos and put it all together here for your perusal.

I’ve also posted this on the Epic Games forums, of which you’ll find the thread here:





  1. Alberto July 20, 2013 9:57 pm

    Hi, I followed this tutorial and it was really helpfull, the only issue I have is that for some reason it isn’t working well when I change the value of the health variable in my pawn.
    it only gives accurate representations of the health at a value of 100, for greater values, the bar will only start to adjust itself after the amount of damage has gone bellow hundred
    do you have any idea what could be the problem

  2. Scott McCutchen (Soverance) July 21, 2013 10:17 am

    That’s an interesting issue, one I suppose I hadn’t looked at.

    Go check out the TickHUD function inside your AegisGFxHUD class. Inside that if statement you’ll find a line that caps the health bar from going over 100. Editing that value is most likely what you’re looking for.

  3. Ryan August 6, 2013 2:22 pm

    When I try to compile i get this error “Error, Bad or missing expression after ‘!=’: ‘getpc2′”

    • Scott McCutchen (Soverance) August 7, 2013 12:22 pm

      Hey Ryan,

      Check out the TickHUD function inside your AegisGFxHUD class. In there, you’ll find an if statement where you likely left out or mistyped one of the parameters passed into the conditional. It’s line 58 in the tutorial example.

  4. Zach October 27, 2013 1:03 pm

    Beautiful. Very helpful, thank you so much.

  5. Joaquim November 5, 2013 8:31 pm

    Your tutorial was very helpful, thanks man.

  6. Nikko February 20, 2014 7:37 am

    Hi Scott,thanks for the tutorial. if i have a health and mana for my character and i want to use those variables to be represented by the custom HUD,will i use this:
    MainHUDMC =GetVariableObject(“_root.gamevariable”)

    _root.gamevariabe is my game variable?
    im new in udk,thanks for the tutorial

    • Scott McCutchen (Soverance) February 20, 2014 10:33 am

      Hey Nikko,

      In the tutorial, MainHUDMC is the variable defined to hold the base HUD object (visually, it’s the window that frames the health bars).

      The variables you’ll use to modify health (I omitted mana during the tutorial, but the process is the same) are stored in the variable HealthText, while the bar itself is stored in HealthBarMC.

      In order to actually use these variables at runtime, you’ll need to link them to their respective objects in the SWF file. This is done on lines 49-51 of the AegisGFxHUD class.

      In your example, _root.gamevariable would actually be the path to the object in your SWF file. MainHUDMC would be the unrealscript variable used to contain that object, so you can modify it elsewhere in the class (see TickHUD())

  7. Isaac Leandro June 4, 2014 10:27 pm

    Hey Scott, I make a health bar and works, but when my pawn die, the bar don’t restart. How can I do to the health bar restart in every respawn?


    • Scott McCutchen (Soverance) June 5, 2014 12:00 am

      Maybe check your Init2() function inside AegisGFxHUD. That’s where you’ll reset the health variable during initialization.

  8. juliana July 11, 2014 11:07 am

    hello did the identical tutorial as you but mine appears the error: couldnt spawn player:
    Could not spawn player, do not know what to do thanks

  9. Scott August 4, 2014 6:21 am

    Great tutorial m8, however, I would like to know how to go about making a hud for the ammo count rather than mana, thanks

Post a Comment