Announcement

Collapse
No announcement yet.

Play a Level Sequence after Idle

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

    Play a Level Sequence after Idle

    Hi guys.

    I'm trying to work out an idea where if my game is left idle for awhile then a level sequence starts playing and the player resets itself to its starting position. I've worked out an idle timer and I have the level sequence set up. I'm just having a problem figuring out how to connect the two since the idle component is in the character blueprint and the sequence is in the level blueprint. Any suggestions?

    I apologize for my newbie-ness.

    G


    #2
    If you have multiple levels and want this to happen in many of them, I'd avoid setting this up directly in the level BP and do it somewhere else instead, like in the Character BP or a GameMode BP.

    You can use the "Create Level Sequence Player" node to create an instance of the level sequence (probably want to store it as a variable, too) and play it when you want. IIRC the output from that node works the same way as an explicit reference to a level sequence instance like you have in your level BP. [Edit: Note this means you no longer need an instance of the level sequence to be placed in the actual level, since you're spawning it at runtime.] (I tried to find online documentation for it but got frustrated and gave up.)

    If you really want to do it in your level BP, you probably need to create an event dispatcher in your character BP and then bind an event to it in your level BP. The level BP is really meant to be map-specific and isn't easily accessed from other BPs.

    Comment


      #3
      Okay, thanks. I'll give it a shot and let you know how it goes.

      Comment


        #4
        Np. Also, you might find the Retriggerable Delay node more convenient for firing an event after a timeout than your setup above. It's essentially a Delay node that resets every time you send it input.

        Comment


          #5
          Wow. That works perfectly. Thanks!

          Comment

          Working...
          X