Announcement

Collapse
No announcement yet.

Passing Variables to Scaleform

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

    Passing Variables to Scaleform

    Hey guys,

    I'm having an issue passing variables from my PlayerController to my Scaleform Dynamic Text Field.
    So far I have a kismet node passing a string variable to my PlayerController, and by logging it I can find that the variable works.

    What I am finding difficult is referencing my PlayerController in my GFxHUD which extends GFxMoviePlayer script.
    So far I have tried:

    Code:
          local HWPlayerController PC;
          PC = HWPlayerController(GetWorldInfo().GetALocalPlayerController());
    And then trying to set the text field to the variable GameObjective.

    Code:
    ObjectiveTF.SetString("text", (PC.GameObjective));
    I end up with an error:
    Bad or missing Expression for token: HWPlayerController, in '='

    If anyone could help me out, I can't seem to get this to run.
    All I need to do is pass a string variable to my Scaleform HUD.

    - Sythen

    PS: The game is singleplayer, does not require ReplicationInfo - hence the PlayerController pass.

    #2
    *shamless bump* please, need help with this.

    Comment


      #3
      I unfortunately am not seeing enough code to help you.
      Can you post the class please.
      Anything in your log?

      Comment


        #4
        Using GetPC() should work fine in this case; as for the error this may be because you're using the class name to access a method or variable instead of the reference, you may also want to log the GFxObject reference - just to make sure it doesn't return none, same goes for the PlayerController one.

        Comment


          #5
          I can't compile this either; don't believe GetWorldInfo() exists within GFxMoviePlayer, dude. As Reinrag just suggested, use the native function GetPC().

          Comment


            #6
            Originally posted by ortizgames View Post
            I can't compile this either; don't believe GetWorldInfo() exists within GFxMoviePlayer, dude. As Reinrag just suggested, use the native function GetPC().
            Not entirely sure what the problem was the last time I used GetPC() but it seems to be working now,
            I do have a second issue that requires some attention.

            I'm trying to use ActionscriptVoid to trigger some animations on the HUD. I understand that ActionscriptVoid needs to be in a function within my GFxMoviePlayer file,
            however how do I call a function within GFxMoviePlayer?

            - Sythen

            Comment


              #7
              Bumpity

              Comment

              Working...
              X