CutsceneManager - Manage/Creates cutscene of qualtiy

CutsceneManager: version 1.0

#resources:community-resources
Logo

Roblox model


CutsceneManager is an easy and organized way to store and create cutscene! this can also allow for outside features to be played in the cutscene like: Dialog, animations etc…

Demo place:


local CutsceneManager = require(script.CutsceneManager)

local cutscene = CutsceneManager:Create("MyCutscene", function(CutsceneCustomizable)
	CutsceneCustomizable:Start()
	
	local camera = CutsceneCustomizable:CreateCamera({Cframe = CFrame.new(0, 100, 0), CameraType = "Fade"})
	camera:Play()
	camera.Completed:Wait()
	
	CutsceneCustomizable:Finalize()
end)

cutscene:Execute()
cutscene.OnCutsceneEnded:Connect(function(result: CutsceneManager.Result)
	print(result)
end)

Why use CutsceneManager?

There are reasons to use CutsceneManager, but here is 3 of them:

  • Organization: With this module, you can easily organize all your
    cutscenes in many different ways.

  • Features: It has a lot of features which can help you improve your
    cutscenes by alot and make it easier to create them.

  • Openness: Because of the design of the module, you have a lot of
    openness to really make your cutscenes stand out from all the others.

What is new about the new module?

  • name argument changed to topic.

  • func argument changed to callback.

  • Eliminate functions can now have a fade end.

  • 2 new functions to get cutscenes from the mudule
    (aka, it stores all the cutscens created in the module).

  • Cutscenes do now have a status properti which can range from
    NotPlaying to Playing.

  • Cutscens also has a new event called OnCutsceneEnded which
    gets fired when the cutscene ended and returns an arugment called result
    which can ether be SUCCESS or FAILED.

  • Cutscenes got a new function called Start which makes the camera able
    to be scripted.

  • Arguments to create a camera has been abbreviated to a single table.

  • Finalize can now also have a fade effect to it.

  • Function descriptions has now been redone.

  • Module is now better type annotated!


Guides

To start of creating a cutscene, you have to use the CutsceneManager:Create(topic, callback)
which will create the cutscene.

The topic argument is the name of the cutscene, while the callback is the function
that the cutscene is going to run in. this callback gets returned an argument called CutsceneCustomizable, which has the functions to create the cutscene.

First you need to start the cutscene using the CutsceneCustomizable:Start

CutsceneManager:Create("MyCutscene", function(CutsceneCustomizable)
	CutsceneCustomizable:Start()
end)

then to create a camera you can use the CutsceneCustomizable:CreateCamera which
takes in a table with:

Cframe = CFrame,
CameraType = CameraType,

-- this table is optional
Properties = {
	EasingStyle = Enum.EasingStyle?,
	EasingDirection = Enum.EasingDirection?,
	Length = number?
}

And of course we to end the cutscene, we have to use CutsceneCustomizable:Finalize

Every thing which returns a object can you make a table infront of. With this
our script will look like this:

local cutscene = CutsceneManager:Create("MyCutscene", function(CutsceneCustomizable)
	CutsceneCustomizable:Start()
	
	local camera = CutsceneCustomizable:CreateCamera({Cframe = CFrame.new(0, 100, 0), CameraType = "Fade"})
	
	CutsceneCustomizable:Finalize({}) -- if you want to create a fade, you have to put a table with params(or just leave it blank for defult setting like i do right here)
end)

To execute the cutscene, you have to do Cutscene:Execute

The camera option also include 2 other thing:

Camera:Play() -- Plays the camera animation
Camera.Completed -- Fires when the cutscene is completed

If you want to know when the cutscene finished, you can use the Event:

Cutscene.OnCutsceneEnded -- Fires when the cutscene ended with a value of ether "SUCCESS" or "FAILED"

Functions

CutsceneManager
  • CutsceneManager:Create(topic, callback):

Creates a new Cutscene object inside the specified topic with optinal arguments
which can be executed using
the Cutscene:Execute.

It has a lot of configurations inside of the CutsceneCustomizable object.

  • CutsceneManager:Eliminate(topic, fade):

Eliminates the specified cutscene.

It will also fire the OnCutsceneEnded event with the result FAILED.

One tip where you can use this: For a cutscene skipping mechanic
  • CutsceneManager:GetCutscenes():

Returns a list of all the cutscenes made in this place

  • CutsceneManager:GetCutscene();

Returns the cutscene with the specified topic

Cutscene
  • Cutscene:Execute(…):

Executes the cutscene which makes the callback run with optinal agruments

CutsceneCustomizable
  • CutsceneCustomizable:Start():

Starts the cutscene by changing the camera mode to scriptable

  • CutsceneCustomisable:CreateCamera(customize):

Creates a camera which can be ether
Tweened, Faded or Moved instantly

It requres a table with atleast the Cframe and the CameraType

  • CutsceneCustomizable:Finalize(fade)

Finishes the cutscene and fires the OnCutsceneEnded event
to notify the end of the cutscene.

If the cutscene was successful, it will fire with the result SUCCESS, else if it was unsuccessful, it will fire with the result FAILED.

Camera
  • Camera:Play()

Plays the set camera animation on the camera to the specific cframe assigned


If any bugs/requested features, please leave them down in the replies section!

11 Likes

Looks cool. Could we get a demo place?

sure. thanks for giving a suggestion!

1 Like

:rotating_light:UPDATE :rotating_light:
Demoplace has now been made. link:

And reusing is fixed!

Thank you!! I’ll test it out now

no problem! i should have done that at the start!

I tested it out and it looks reallyy good so i need to ask a question, does it work with abilities ?
Example : A grab move with multiple npcs.

If it doesnt i highly suggest you to add functions like animating npcs, adding vfxes etc. But it looks really cool tho.

Ty for reading this :smiley:

2 Likes

Just updated with a feature where you can have custom arguments to the function, which makes for better customizations to your cutscenes. Thanks for the suggestion! ps: you can now have the same cutscene for multible npcs!