GUI button that ignores Wait Command

Started by Nixxon, Wed 21/10/2020 01:33:56

Previous topic - Next topic

Nixxon

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.

Khris

In sounds like you're primarily looking for a way to skip a cutscene, which is what the 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.

Nixxon

Brilliant, thank you.

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

Thank you again,

SMF spam blocked by CleanTalk