Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: ddavey1983 on Fri 05/03/2021 19:55:24

Title: Skipping Cutscenes
Post by: ddavey1983 on Fri 05/03/2021 19:55:24
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
Title: Re: Skipping Cutscenes
Post by: Khris on Fri 05/03/2021 20:10:52
Absolutely, the cutscene commands would be unusable otherwise. AGS still runs everything, just at infinite speed if you will.
Title: Re: Skipping Cutscenes
Post by: ddavey1983 on Fri 05/03/2021 21:37:47
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.
Title: Re: Skipping Cutscenes
Post by: Crimson Wizard on Sat 06/03/2021 01:49:54
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) Select

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