#Skipping lua-cutscene breaks game

19 messages · Page 1 of 1 (latest)

leaden horizon
#

after skipping the following cutscene, i am unable to move, please help:

function onBegin()
    disableMovement ()
    runTo (125*8)
    player.DummyAutoAnimate = false
    player.Sprite:Play("bubble")
    wait (0.5)
    say ("dialogue")
    wait (0.5)
    player.DummyAutoAnimate = true
    say ("dialogue")
    wait (0.5)
    walkTo (127*8)
    player.DummyAutoAnimate = false
    player.Sprite:Play("bubble")
    say ("dialogue")
    player.Sprite:Play("faint")
    wait (4)
    player.DummyAutoAnimate = true
    teleportTo (216, (256*8)+120, "location", "WakeUp")
    enableMovement ()
end

function onEnd(room, wasSkipped)
    instantTeleportTo (216, (256*8)+120, "location")
    player.DummyAutoAnimate = true
    enableRetry()
    enableMovement ()
    enablePause()
end
gloomy jackal
#

try removing the space in enableMovement ()

#

should be enableMovement() i think

#

not sure if it matters, but worth a try

leaden horizon
split stirrup
#

cutscenes don't continue running if you change rooms

#

although actually that should be an issue when not skipping here thinkeline

leaden horizon
leaden horizon
#

found something interesting, when I don't skip the cutscene, I spawn in the next room, but in the escape menu I still have the skip cutscene option.

pearl surge
#

this is because the lua cutscene entity is unloaded on room transition

#

meaning onEnd is never run

leaden horizon
pearl surge
#

the function is stopped from executing when switching rooms

#

this is kinda known lua jank

leaden horizon
west kestrel
#

simplest solution is put one more cutscene at place where you teleport

leaden horizon
leaden horizon
#

this doesn't break it, but no teleport

function onEnd(room, wasSkipped)
    if wasSkipped then
        player.DummyAutoAnimate = true
        enableRetry()
        enableMovement()
        enablePause()
        --instantTeleportTo(216, (256*8)+120, "chapter_2-intro_2")
    end
end