CutsceneService - Smooth cutscenes using Bézier curves

Don’t stress it man your already providing a free service you aren’t obligated to provide updates on demand lol

1 Like

Yes, but without a bit of demand and pressure it would have taken way longer, maybe even a year. Showing interest is always good. I’m almost finished now, still testing the new features.

1 Like

How do I use this? YieldAfterCutscene

YieldAfterCutscene is a special function.
You can add as many as you want of them after the 2nd argument in the Create function.
Example:

local cutscene1 = CutsceneService:Create(workspace.Cutscene1, 5, "YieldAfterCutscene")

As you can see in the documentation, YieldAfterCutscene has a required parameter waitTime. Arguments for special functions can be passed right after the string:

local cutscene1 = CutsceneService:Create(workspace.Cutscene1, 5, "YieldAfterCutscene", 3)

This creates a cutscene which yields 3 seconds before finishing.

I hope I could help you. If you haven’t done so already, I recommend reading the 2nd section of the tutorial. I also made a place where you can see example cutscenes.

1 Like

It helped! Thanks. I have another question, you said that queues are still being implemented and we cant play cutscenes back to back, but is there a current workaround for this right now?

I just released version 1.3.0!

Known issues:

You might see in Studio that some functions have a parameter called cutscene or queue:

This exists because otherwise you would get this warning in strict mode:
image

Furthermore, you can play the same cutscene multiple times simultaneously when a queue is playing it.

1 Like

Would you be able to post the source to GitHub?

1 Like

Yup, you can find it here: GitHub - bstummer/CutsceneService

1 Like

In my game there’s a title screen where the camera is flying around the map, and when you push “Play” it ends the cutscene and teleports you to your plot with your camera going back to normal. I’d really like it to tween the camera back to the player, like it would normally if the game ended. But I can’t figure out how, there’s no way to “end” a cutscene and force it do it, so I’m not sure.

It’d be really nice if Queue:Cancel() could tween the camera back to the player, anyone got work arounds though?

It’d be possible to add a parameter to the Cancel function which decides whether the CameraType will be changed back (I can’t do this until Tuesday though).
In that time you could implement it yourself (it’s not that hard) or instantly change the CameraType to Scriptable after calling Cancel. After that, you can tween the camera to the player.

1 Like

If I’m creating the cutscene, can I end it from a different script?

You need the reference to the cutscene object, so if you find a way to get that from a different script you should be able to do anything with it.

I might use this as a loading screen, that would be possible, right?

Sure, others have done it as well :slightly_smiling_face:

Ayyy this is going to help me so much! Thanks!! :grinning:

1 Like

I need help on how I would go about looping a queue

A queue is a linked list of cutscenes. You can modify this list:

local queue = CutsceneService:CreateQueue(cutscene1, cutscene2, cutscene3)
queue:Play()
cutscene3.Next = cutscene1

This will create an infinite loop of the 3 cutscenes. The Next property will be overwritten/removed when functions of the queue are called, so you have to edit it after calling queue:Play().

One last question, Is it possible to make a loop out of this cutscene for a loading screen, so it will just go back to the first part(Smoothly) after it is finished.

You need the special function EndWithCurrentCamera for a smooth loop.
It is possible to loop a cutscene like this:

cutscene:Play()
cutscene.Next = cutscene