No announcement yet.

CS3 able to make scaleform UI?

  • Filter
  • Time
  • Show
Clear All
new posts

    CS3 able to make scaleform UI?

    doing the tutorial on noexp and wondering why it doesn't even change the regular editor UI

    I pretty much got the same code and using it for the june beta release.

    my only alteration is that I dont need a bar so I am just using text fields for the UI

    I set up the scaleform launcher in my CS3 and it seems to be working fine.

    I also save and publish the file and everything and the AS 2 and flash player 8

    class STGFxHUD extends GFxMoviePlayer;
    //Create a Health Cache variable
    var float LastHealthpc;
    //Create variables to hold references to the Flash MovieClips and Text Fields that will be modified
    var GFxObject HealthTF;
    var GFxObject Score;
    //  Function to round a float value to an int
    function int roundNum(float NumIn) {
     local int iNum;
     local float fNum;
     fNum = NumIn;
     iNum = int(fNum);
     fNum -= iNum;
     if (fNum >= 0.5f) {
     return (iNum + 1);
     else {
     return iNum;
    //  Function to return a percentage from a value and a maximum
    function int getpc(int val, int max) {
     return roundNum((float(val) / float(max)) * 100.0f);
    //Called from STHUD'd PostBeginPlay()
    function Init(PlayerController PC) {
     //Start and load the SWF Movie
     //Set the cahce value so that it will get updated on the first Tick
     LastHealthpc = -1337;
     //Load the references with pointers to the movieClips and text fields in the .swf
     HealthTF = GetVariableObject("_root.health_txt");
    //Called every update Tick
    function TickHUD() {
     local UTPawn UTP;
     //We need to talk to the Pawn, so create a reference and check the Pawn exists
     UTP = UTPawn(PlayerOwner.Pawn);
     if (UTP == None) {
     //If the cached value for Health percentage isn't equal to the current...
     if (LastHealthpc != getpc(UTP.Health, UTP.HealthMax)) {
     //...Make it so...
     LastHealthpc = getpc(UTP.Health, UTP.HealthMax);
     HealthTF.SetString("text", round(LastHealthpc)$"%");
     //this is the HUD. If the HUD is off, then this should be off
     //The path to the swf asset we will create later
     //Just put it in...
     bGammaCorrection = false
    that is the only change.

    After that all i do is import Swf file into UDK with the same exact path for movieInfo.

    Now this is where I am kind of confused.

    Do I have to then exit UDK editor then uncomment the Movieinfo code or do I uncomment it then reload the Swf file?

    Because no matter what I do it still shows the default UI

    I went in BaseGame or Editor(forgot which one not at my UDK computer) and changed the default Playercontroller to ST playercontroller.

    I mean it is either I am an idiot who don't know how to follow direct instructions or it is CS3 keeping me from doing this

    Scaleform GFx/CLIK are compatible with CS3. I can't support a user created tutorial, but there is a good chance you're just missing a few important steps. Be sure to review all the UDN Scaleform documentation and watch the videos for setting up things (all found in the Getting Started with GFx sticky post), and be sure you've followed every step of the tutorial you're using.