Is it possible to cut between level sequences without the one frame cut to player?

I’m not sure if this is a verse or a device thing but if I have two cinematic devices and I play them in an async context, one after another (like in the code below)

  CinematicDevice.Play(WinningAgent)
  #CinematicDevice.StoppedEvent.Await()

  Sleep(3.9)

  CinematicDevice2.Play(WinningAgent)

There is a one frame cut back to the player. Is it possible to get rid of that?

Also, FWIW, if I Await on the stopped event to fire, I get a much longer cut back, like at least 3 frames, maybe more. So I have to align a Sleep with the cinematic length, which introduces a dependency between code and an asset that I’m not a fan of.

Thanks!

1 Like

Hi,
what I think might be happening is that the first sequence CinematicDevice restores state (jumping back to the normal camera) immediately before CinematicDevice2 retakes control.

If your issue is mainly with the camera, you could choose not to restore state for the camera track. See this option on the LevelSequence asset by right-clicking on a track in Sequencer:

Depending on your use case, you might also be able to use a single Level Sequence that contains subsequences tracks one after the other.

1 Like

Thanks for the suggestion. I tried it and it sort of works. The cinematic I’m playing has other objects in it (like a white background) and when it jumps to the next cinematic, that white background is gone. I assume this is because it is restoring the state of that background back to when it wasn’t visible because the cinematic itself is set to restore state. So in order to make the camera not look like it cuts back for a frame I’d need to keep the state of that background. But then is there a way to eventually get rid of that object? Or would I need a subsequent level sequence that removes it?

Another question that this brought up. If I keep the state of the camera and play another cinematic that is set to restore state, then it goes back to the camera from the first cinematic because that was set to keep state. How do I then go back to the player camera?

Finally, you mentioned subsequences. Is there anyway to parameterize those and pick a subsequence based on some criteria? If I could do that I could make it all one sequence but the subsequences change based on some criteria.

I’m also seeing a blink of a single frame when trying to play sequences back to back. It seems like the second sequences takes a frame to load or initialize.

Even just doing this you can see it:

PlaySequences()<suspends>:void=
    Sequence1.Play()
    Sleep(2.0)
    Sequence1.Stop()
    Sequence2.Play()

Both sequences have tracks targeting the same objects. Should I not call Stop()? This seems to cause other issues where the next sequence fails to play.
All Cinematic sequence devices have “Restore State” disabled and none of the sequences animate cameras.

@DiG3 any ideas on these questions?