Announcement

Collapse
No announcement yet.

Font Problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Not sure about your font problems, as I've not had any issues myself, but you are trying to pass an integer (LastHealthpc), where a string is expected as the argument. Try casting LastHealthpc as a string:

    Code:
    HealthTF.SetString("text", string(LastHealthpc));

    Leave a comment:


  • started a topic Font Problems

    Font Problems

    A few problems here...

    I'm using a font by importing into the editor and editing the localisation file to match it up to the Flash file. 2nd method in this video: http://www.youtube.com/watch?v=QP-MawV87Vc

    1. Once I create a new font in Flash I can no longer save the file.
    Unable to save the document as "C:/UDK/etc etc etc" Please try saving to a different filename or to a different location.
    This happens even if I save as a new file.

    2. I can import the font into the editor just fine, and connect the font in the editor to the text field in the Flash file by editing GFxUI.int in the localisation folder. But ingame it only appears as the default Flash font. All steps in the video were followed.

    3. I'm following this script (which is a bit outdated with the "PlayerOwner" thing, but otherwise good) and when I get it to put some custom text in, I get blank boxes.
    Code:
    var GFxObject HealthTF;
    ...
    HealthTF = GetVariableObject("_root.healthbar_mc.health_txt");
    ...
    HealthTF.SetString("text", "test");
    The text field and movie clip are named appropriately and set to Dynamic Text. The HealthTF.SetString happens in TickHUD()

    4. If I change the "test" text above to the variable LastHealthpc as below:
    Code:
    var int LastHealthpc;
    ...
     LastHealthpc = MyPawn.Health;
    ...
    HealthTF.SetString("text", LastHealthpc);
    then I get the compile error:
    C:\UDK\UDK-2012-01\Development\Src\MonkeyTag\Classes\MonkeyGFxHUD. uc(41) : Error, Type mismatch in Call to 'SetString', parameter 2
    So much going wrong... Spent all day and have gotten nowhere. Any suggestions?
Working...
X