Announcement

Collapse
No announcement yet.

Calling Advance( 0 ) from kismet?

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

    Calling Advance( 0 ) from kismet?

    After a long period of handling everything regarding scaleform from unrealscript I am now in some need of kismet integration so that our I can collaborate better with out artists.

    Something that I got stuck on is how to initialize things when starting a movie from kismet. When I start a gfx movie via US I use the Init function and in that function call Start() and Advance( 0 ) to initialize everything on the first frame so that I can call functions and use the variables. How can I do this via kismet?

    Right now I have a InvokeActionScript hookes up to the "succeded" part of the "open gxf movie" in kismet. But since I haven't been able to call Advance ( 0 ) all the things i use in the called functions isn't initialized yet.

    So how should I do to call a function in actionscript directly after it has been initialized?

    #2
    should it be Advance(0.0f)

    Comment


      #3
      You'll want to create a class that extends GFxMoviePlayer and use it as the movie player in the Open GFx Movie kismet node. In that class, include a start function.

      Code:
      function bool Start(optional bool StartPaused = false)
      {
          super.Start();
          Advance(0);
      
          return true;
      }
      Also, if you want to use invoke, after "success", add at least a 0.1 second delay between the "success" and your invoke, to ensure that movie is loaded fully.

      Comment


        #4
        Ah ok, I tried doing that except I used the Init function instead of Start but that didn't work.

        Thanks for the help.

        Oh and about the timer, should I do that via kismet or AS? The way I interpret it is that I should add a 0.1 second timer to the "success" of the kismet open gfx movie event and then use the invoke. But shouldn't the call to advance( 0 ) be enough to make sure everything is loaded already?

        Comment


          #5
          Try it with and without the delay. If it works without the delay, then go with it that way.

          Comment

          Working...
          X