Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.74 KB

cancel-cutscene.md

File metadata and controls

36 lines (27 loc) · 1.74 KB

cancel cutscene

Cancels the current cutscene that is running within a start cutscene block. This will only cancel blocks from the "Story" category; other blocks like ask for string will not be cancelled.

story.cancelCurrentCutscene()

Example #example

In this example, we use cancel cutscene to interrupt a conversation when the A button is pressed.

controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
    story.cancelCurrentCutscene()
    story.startCutscene(function () {
        story.printCharacterText("OBJECTION!!!!", "Prosecutor")
        story.printCharacterText("That video is clearly using clips from the popular video \"CAT LUVS SUNBEAM LOL PLZ SUBSCRIBE\"", "Prosecutor")
    })
})
story.startCutscene(function () {
    story.printCharacterText("Your honor, I think you'll find that there is no way my client could have been present when the heist occurred", "Defense")
    story.printCharacterText("As you can see, the surveillance footage clearly indicates that my client was playing a charity tennis match against a cat at the time", "Defense")
    story.printCharacterText("He lost three straight sets. Who would make up such a shameful display?", "Defense")
    story.printCharacterText("My client sits here, ashamed, knowing that the world now sees that a cat with no interest in the sport could beat them in a game of tennis", "Defense")
    story.printCharacterText("Who would allow themselves to be subjected to such humiliation? The cat was napping in a sunbeam for most of the second set", "Defense")
    story.printCharacterText("My client had nothing to do with this terrible crime", "Defense")
})

arcade-story=github:microsoft/arcade-storytelling