Results 1 to 13 of 13
  1. #1
    MSgt. Shooter Person
    Join Date
    May 2010
    Posts
    80

    Default ScaleForm HUD Tutorial (Updated August Scripts)

    Hey guys i was working hard with Wizzard~Of~Ozz on this one .

    http://3dtuts.co.cc/2010/08/adding-y...ugust-version/

    Hope you like it and can understand it


    Thanks

  2. #2
    MSgt. Shooter Person
    Join Date
    Apr 2010
    Location
    Plymouth
    Posts
    134
    Gamer IDs

    Gamertag: shadix121

    Default

    i think a big credit would goto Grosie for creating the original tutorial aswell (TheCodedMonkey Youtube channel)
    Hardscope Studios
    -------------------------------------------------------------------------------------------------------------------------
    Youtube Channel | Hardscope Studios | UDK tutorial series | KY2K DiviantART | KY2K Twitter
    -------------------------------------------------------------------------------------------------------------------------
    [WIP] Metro | Epic Gamers UDK Tutorial Series | KY2K Games

  3. #3

    Default

    i cant get my hud text moving i have alredy changed all you text things to my hud txt instance name also my hud bar works but the text doesnt

    also here is my action script thing

    import gfx.motion.Tween;
    _global.gfxExtensions = true;
    var angle:Number;
    function init() {
    healthbar_mc._yrotation = -10;
    angle = 80;


    // All others below are just extra’s you can add , the main 1 is the one above.
    healthbar_mc._yrotation = -10;
    angle = 0;

    healthtxt._yrotation = -10;
    angle = 0;

    }
    init();
    //if you have the text above your healthbar you can make it go back and forth in the z axis to create a 3d effect .
    _root.onEnterFrame = function() {
    angle += 0.10;
    var sined:Number = Math.sin(angle) + 2;
    sined /= 2;
    healthbar_mc._z = -50 * sined;
    healthtxt._z = -100 * sined;
    }
    Last edited by alvarofer0020; 08-21-2010 at 04:48 PM.

  4. #4
    MSgt. Shooter Person
    Join Date
    Apr 2010
    Location
    Plymouth
    Posts
    134
    Gamer IDs

    Gamertag: shadix121

    Default

    Code:
    _global.gfxExtensions = true;
    
    var angle:Number;
    
    function init() {
     HealthBar_MC._yrotation = -30;
     angle = 0;
    }
    
    init();
    
    _root.onEnterFrame = function() {
     angle += 0.1;
     var sined:Number = Math.sin(angle) + 2;
     sined /= 2;
    
     HealthBar_MC.Bar_mc._z = -600 * sined;
     HealthBar_MC.Health_txt._z = -400 * sined;
     //PDA._z = -200 * sined;
    }
    well this is my code it looks simaliar however in flash have you named all instances in the properties window?
    Hardscope Studios
    -------------------------------------------------------------------------------------------------------------------------
    Youtube Channel | Hardscope Studios | UDK tutorial series | KY2K DiviantART | KY2K Twitter
    -------------------------------------------------------------------------------------------------------------------------
    [WIP] Metro | Epic Gamers UDK Tutorial Series | KY2K Games

  5. #5

    Default

    yes i have named all the instances my healthbar is named healthbar_mc and the text health_txt

    also i just try with you code and still with out work and i changed the instance names to my instance names
    Last edited by alvarofer0020; 08-21-2010 at 05:21 PM.

  6. #6

    Default

    nvm i fixed it

  7. #7
    MSgt. Shooter Person
    Join Date
    May 2010
    Posts
    80

    Default

    good goood

  8. #8
    MSgt. Shooter Person
    Join Date
    May 2010
    Posts
    80

    Default

    btw guys i will be dooing a series of tuts very soon so keepp an eye on my site if you want :P

  9. #9

    Default

    i compile and give me this errors

    C:\UDK\UDK-2010-08\Development\Src\MyMod\Classes\SensitivityGFx.uc (47) : Error, Bad or missing expression in Call to 'SetFloat', parameter 1
    C:\UDK\UDK-2010-08\Development\Src\MyMod\Classes\SensitivityGFx.uc (30) : Error, Bad or missing expression in Call to 'GetVariableObject', parameter 1
    C:\UDK\UDK-2010-08\Development\Src\MyMod\Classes\SensitivityHUD.uc (17) : Error, 'new': Class 'SensitivityHUD' is an Actor subclass, use 'Spawn' instead

  10. #10
    Iron Guard
    Join Date
    Dec 2009
    Location
    Ontario, Canada
    Posts
    632

    Default

    I've never been a fan of "follow along" tutorials. There are just too many slight variations that can't be accounted for. Sometimes it's best to understand why something is what it is not just accept that it is.

    var GFxObject MyObjectInSWF, MyChildObject;

    Now, there are 2 ways to populate those variables ( within my GFxMovie subclass ). First I can call

    MyObjectInSWF= GetVariableObject( "_root.MyObjectInSWFName" );
    MyChildObject = GetVariableObject( "_root.MyObjectInSWFName.MyChildObject" );

    Or, instead of the second line we can simply call

    MyChildObject = MyObjectInSWF.GetObject( "MyChildObject" );

    For those not familiar with SWF, The general way things are built is ( using above )
    _root <- This is the main movie
    MyObjectInSWFName <- Is the instance name of a symbol directly placed into the main movie
    MyChildObject <- Is the instance name of a symbol placed within the symbol above.

    This is quite similar to a directory structure.
    C:\ <- _root
    C:\Program Files <- Child Object of root
    C:\Program Files\UDK <- UDK is a child object of Program files which is a child object of C:\

    Now we get into what those symbols are, If MyChildObject above is a text field, then you can read the text by calling
    `Log( MyChildObject.GetString( "text" ) );
    or set it with
    MyChildObject.SetString( "text", "Hello World" );

    Section removed, apparently following a variable is not optimal.

    Sorry for such a long post and it being potentially pretty basic stuff. Figure once you understand how to Set/Get variables, Tell MovieClips to GotoAndPlay then you'll find things move along a lot faster than troubleshooting what could be a simple typo ( not that those don't happen anyway )
    Hopefully this helps get people started with UScript/Scaleform interaction.
    Last edited by Wizzard~Of~Ozz; 09-17-2010 at 09:23 AM.
    Mike

  11. #11

    Default

    WoO, unsure of your recommendation.
    I was following TheCodedMonkey's tutorial, and made adjustments for August as mentioned above (I switched MyGameInfo to extend UTDeathmatch rather than UTGame like 3dcamel has). I compile cleanly but when launching the game, I have no HUD at all. The log gives errors every Tick - can't access my child symbols in the swf.

    Also, when I have MyGameInfo extend UTGame, I don't get the errors in the log, but I still have no HUD at all. The last line in the log is "NO VALID MINIMAP INFO in MAPINFO!"

    Any ideas?

  12. #12

    Default

    Also, I'm confused by 3dcamel's variables, do you keep CodedMonkey's var declarations, and add a declaration using the instance name, or just use the instance names, not new variables? If the instances are nested in others, how would the var GFxObject declaration look like?

  13. #13

    Default

    I'm good now. Found the other long thread where this was all hashed out. Mine still didn't work until I had MyGameInfo extend UTDeathmatch (as in original tutorial) rather than UTGame (as 3dcamel had it). The other problem I had that wasn't addressed in any of the threads was how to get the .swf into the Content Browser. UDK (august) requires my .swf files to be specifically in UTGame/Flash/MyProject/MyProject.swf in order to import them. This is not the path needed by the code in MyGfxHud.uc (MyAssets.HUD.HudSwf), and I tried a bunch of re-naming, re-organizing, changing the path in this line of code, etc. but couldn't get things right. Finally, I kept the orginal code from the tutorial, placed the .swf where UDK wants it just to get it in, and then right-clicked on the .swf in the content manager and was able to change it's path to match my code, which I couldn't do on import.
    Thanks everyone!


 

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.