#Dialog choices with Lua Cutscenes

47 messages · Page 1 of 1 (latest)

vast mortar
#

I'm trying to make some dialog with choices using the template from gamation's Lua guide. Just trying to get the thing to display properly before doing anything fancy with it.

#
 function onTalk()
    disableMovement()
    say("Hello")
    choiceDialog({
        {
            -- This choice will not display a dialog, and instead run the code in 'onChosen'
            "DIALOG_WITH_EFFECT",
            onChosen = function ()
                jump(0.2)
                wait()
                waitUntilOnGround()
            end
        },
        {
            -- this choice will still display a dialog like normal, but also run code in 'onEnd' after the dialog finishes.
            "DIALOG_CLOSE",
            onEnd = function ()
                -- call this function to close the choice dialog and allow the cutscene to continue.
                closeChoiceDialog()
            end
        }
    })
    enableMovement()
end

function onEnd(room, wasSkipped)
    enableMovement()
end```
#

this is what i have at the moment

#

this just does the say("Hello") part then finishes

#

that's kinda gross to look at, not sure how to format it lol, here is a picture that is easier to read

celest shale
#

finishes means that dialogue ends?

vast mortar
celest shale
#

?

#

like

#
function onTalk()
blablkflgafdklgjdlkgjdk
end
vast mortar
#

oh you have to have a break after

celest shale
#

yea

#

...but screenshot looks better anyway because vscode highlightes more things...

celest shale
#

and you can walk?

vast mortar
#

yeah, it basically does everything except the choice dialog

#

the enable movement works and i can talk to it again etc.

#

just says [Hello] and that's it

#

huh

#

i just tried using the exact template from the guide

#

that does nothing too

celest shale
#

ig you should ping Cruor. ~~not me cuz i'm in his blacklist snowmadeline ~~

vast mortar
#

it's not cruor's problem

#

i'm gonna try a bit more troubleshooting and ping gamation about it if i can't figure it out

celest shale
#

he made lua cutscenes

#

example doesn't work

vast mortar
#

yes...

#

but it's gamation's guide and ja's code

#

lua cutscenes isn't the problem

celest shale
#

ok.

vast mortar
#

maybe that's why you are on the blacklist laugheline

celest shale
#

?

#

cuz i think that he made lua cutscenes but he didn't?

vast mortar
#

he did make lua cutscenes

#

but it's not lua cutscenes that is the issue

#

anyways, i've found a workaround for this in the meantime

#

just using the choice helper instead of choiceDialog

strange stump
#

@vast mortar where's the example from? what did the log say when the cutscene failed?

vast mortar
#

near the bottom

#

"Making dialogue choices with the ChoiceDialog function"

#

not sure about the log

celest shale
#

oh wait you used this example

#

never knew about it