Announcement

Collapse
No announcement yet.

Button to load a level without the matinee

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

    Button to load a level without the matinee

    Hi guys, I'm starting to learn blueprint and UMG.

    I have a matinee that play on level load and is looping. It's my background. On top of that I added a menu with 3 buttons. One to reload the level (to replay the matinee from start), one to navigate the scene and one to quit.

    I would like to make the Navigate button reload the level but without matinee playing on level load this time. Do you have an idea how to program it? I know I could make 2 copies of the same level, one with and one without the matinee playing on level load but I feel it's not very optimal. Thanks!

    Here's my setup...

    Click image for larger version

Name:	Untitled.jpg
Views:	1
Size:	407.5 KB
ID:	1158701

    #2
    What I understand is that:

    You have a level with a matinee that runs on startup. Right?
    You have a button that loads this level, right?
    You want to have a button that starts this level without matinee, right?

    If so, you need to do like that:

    Create a new Game Instance. In game instance create a Bool option "Run Matinee in This Level" or something.
    Turn off the automatic Matinee startup in this level.
    Now, Game Instance is run for Game Instance, not level, not anything. You start an Unreal Game, then Game Instance is spawned and it doesn't change, thus it is good to keep variables. As I know it's not replicated and clients have their own Game Instances at it is per engine.
    So, when you click the NO MATINEE BUTTON you don't change the bool from false to true.
    When you click the RUN WITH MATINEE you change the bool to true, level changes, the level with matinee needs to read the bool from Game Instance that it's true and starts the animation.

    Should work.

    I think you could do the same with Player Controller, but I'm not quite sure.
    Last edited by Z-enzyme; 08-02-2015, 09:47 AM.

    Comment


      #3
      Thank you man I'm going to give it a try tonight!

      Comment

      Working...
      X