Returning to earlier script

Hello creators, this is my first post, so this is a milestone.

I have a computer in my story and when you "use computer" it runs through a script: first, it quickly simulates you logging in and then it presents a menu of choices. Each menu, through a SWITCH command, takes you into through script (for example, mission log). However, at the end of that, you can press any key to go back. So I want it to take you back to the previous script (to the point after the simulated login when the menu is presented). I was trying to see if there was a way to "bookmark" that menu and then just reference the bookmark. Can anyone assist?

I'd suggest putting each menu in a function, so the player can navigate back and forth through them. Depending on the complexity of your menus, you might also need some attributes to keep track of the state of the system; but I suspect you'd already have that set up.

I wanted to make something similar for my game. What I did was use different script attributes attached to the computer object, and the invoke (script) or do (object, scriptattribute) commands.

For example, I have a primary computer.menuscript script that gets called when the computer is used. This script generates the basic menu of options for what the player can do at the computer. Selecting one of the options will invoke a different script attribute (computer.emailscript, computer.browseinternetscript, etc.)

When I want the player to return to the main menu, it's then just a matter of invoking the main computer.menuscript again. If you have turnscripts, you should be sure to pepper in a couple SuppressTurnscripts and RunTurnScripts as-needed to make sure each individual invocation doesn't advance the turn order, but this kind of system is working out well for me so far.

Hope that helps

Log in to post a reply.