Skipping Cutscenes

Started by ddavey1983, Fri 05/03/2021 19:55:24

Previous topic - Next topic

ddavey1983

Hello.

I've looked at the manual and the forums but can't find a definitive answer. I understand hiw to use cutscenes, how to skip them etc. My question is, if during the portion of code that is skipped there is a necessary change (global variable changes, character changes view, player adds/loses inventory item) will that still happen if the cutscene is skipped?

Basically: does all the code still happen it just isn't seen by the player?

It seems from my experimentation with it does but I just wanted to check before I ruin my game!

Thanks

Khris

Absolutely, the cutscene commands would be unusable otherwise. AGS still runs everything, just at infinite speed if you will.

ddavey1983

Great! Thanks for that! I wasn't sure if I'd have to move all the important stuff to the lines after the end of the cut scene. This will be much easier! Thanks again.

Crimson Wizard

#3
Something to keep an eye for, there are certain commands that may make cutscene skipping "stuck" for a while (not sure if that's a bug or something engine cannot prevent), or simply be unnecessary if player is skipping.

A random example: you need to allocate and paint dynamic sprites during cutscene, but that takes program memory and time. If player is skipping you do not want to do redundant things like that.

For this purpose there's "Game.SkippingCutscene" property that tells you if cutscene is currently being "fast forwarded". You may check it and dont do these extra actions:
Code: ags

if (!Game.SkippingCutscene) {
    // some time consuming task
}

SMF spam blocked by CleanTalk