Page 1 of 1

return to menu after script [solved]

Posted: Sun Sep 09, 2018 2:17 am
by XxrenxX
I've been posting a lot today but I am getting frustrated doing this alone.

So I have some side stories programmed into my game that are accessible via the extra's menu. However no matter what I try the game either crashes when it tries to return or it starts a new game, ignoring any menu's asked to go to.

here are some different codes I've tried. Am I at least on the right track? (each line a different variation I tried)

Code: Select all

return
return ("mainmenu") #Also tried with ("extra_screen") as well as empty ()
return () action ShowMenu("extra_screen")
action ShowMenu("extra_screen")
jump ShowMenu("extra_Screen")
jump("extra_Screen")
call_extra_screen
call("extra_screen")
I either have the game start a new game oran error saying invalid syntax.

Re: return to menu after script

Posted: Sun Sep 09, 2018 6:41 am
by MaydohMaydoh
From your previous thread, I'm guessing you're using the Jump action, which for this won't work. You can't return from a jump. You should use Start("label_name") instead and put return at the end of the script, which will return you to the main menu.

Re: return to menu after script

Posted: Sun Sep 09, 2018 1:18 pm
by XxrenxX
so instead of Jump("label") use Start("label") for the hotspot and the return function should act as intended?

Seems to be working. Can't believe I didn't think of that.