An easy-to-use UI to create simple cinematic conversations with NPCs on Onset
local CUI = ImportPackage("cinematicui")
{
title = "NPC Name",
message = "Hello world!"
actions = {
{
text = "Yes",
callback = "YesClickedOnCUI",
close_on_click = true
},
{
text = "No"
callback = "NoClickedOnCUI"
}
}
}
Please note that, in this example, YesClickedOnCUI
and NoClickedOnCUI
are events registered in your package like this:
AddEvent("YesClickedOnCUI", function()
-- Do something
end)
The Npc identifier (by default, it will be the closest NPC)
An animation present in the AnimationList. Default is WAVE2
Same as CUI.startCinematic
.
Please note that iftitle
and/or message
is/are empty, the UI will keep those sent tostartCinematic
. Not sending any actions
will remove buttons from the UI.
Stops the cinematic.