The easiest one to create is “Play”. This button typically will use the “change scene” behavior to move users to the first level in your game. Typically, your main menu will be your first GameSalad scene, so the first level in your game will typically be your second scene. We can set this up with a very easy rule:
Another type of “menu” is an in-scene or in-game menu. These are the options that might pop up if your user pauses the game. Typically, they include options like going to the main menu, restarting a level, or quitting the game.
One of the tools GameSalad offers to ease this process is the ability to create multiple layers in a scene, which allows you to have a static overlay that stays in place regardless of what else is happening in the scene by setting a particular layer to non-scrollable. This allows you to have ever-present user interface (UI) options such as a pause or menu button.
Both of these buttons would rely on the Pause Game behavior, which pauses all activity in the current scene, while bringing up another scene’s actors as an overlay – all without moving away from the current scene. Used in conjunction with this is the Unpause Game behavior, which removes the overlay and causes activity in the current scene to resume. Simply create a scene to be brought up with your in-game menu, and use the “change scene” and “reset scene” behaviors as needed to provide the appropriate functionality. Don’t forget that your main menu is most likely a scene, and can thus you can direct your players directly to it if necessary.
Don’t forget that when you use the “change scene” behavior, the only things that are maintained from the previous scene are the current value of all game attribute and the project running time (covered in a forthcoming tutorial). This is ideal for shifting between levels and the like.