Results 1 to 2 of 2

Thread: Font Problems

  1. #1
    MSgt. Shooter Person
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    148

    Default 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?
    ╗ Team Friendship (UDK 4P co-op) "Like" our Facebook Page for dev-blog updates
    Audio Tours Australia - MP3 walking tours of Australia

  2. #2

    Default

    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));


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.