Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Nixxon on Wed 21/10/2020 01:33:56

Title: GUI button that ignores Wait Command
Post by: Nixxon on Wed 21/10/2020 01:33:56
Hi Guys,

I've had a bit of a search, but can't seem to find anything relevant.

I have carefully scripted intro scene which uses the wait: command to great effect.

upon creating a GUI with a 'skip button', I am having difficulty getting it work. Not only does the push down graphic not appear, it doesn't run the script (player new room).

I've checked the Z order and all appears to be hunky dory.

I've come to the realization it is likely because the entirety of the intro scene is usually script blocked due to the wait command.

Is there anyway to get around this? Can i have this particular button pause the script?

Many thanks.
Title: Re: GUI button that ignores Wait Command
Post by: Khris on Wed 21/10/2020 09:17:54
In sounds like you're primarily looking for a way to skip a cutscene, which is what the StartCutscene() (https://www.adventuregamestudio.co.uk/manual/ags53.htm#StartCutscene) command is for.

As for dealing with GUI buttons during blocking events, you probably have to use Button.GetAtScreenXY(), mouse.IsButtonDown() and repeatedly_execute_always.
Title: Re: GUI button that ignores Wait Command
Post by: Nixxon on Wed 21/10/2020 22:41:42
Brilliant, thank you.

I don't know why, but i thought the cutscene function was removed years ago.

Thank you again,