For more information about Interfaces, please see this page:
Timer/Spawn – used to run a script at specific intervals.
Play Interface – starts testing an Interface.
Animate Animations – stops/starts animations from playing on the Interface. This doesn’t affect in-game animations.
Background Color – is used to toggle the background color of the Interface editor from black to white. This is useful when dealing with black/white text/graphics.
Properties – opens the Interface Properties window.
Here you can add, edit and remove different layouts for various devices with different resolutions. You can use the drop down menu to select one of the pre-set resolutions or you can click the “Add” button to the right to set a custom resolution and specify the device/operating system it applies to.
A Heads Up Display (HUD) is typically used to provide players with critical information at a glance, such as available health, money, equipped Items, score, etc. The set up of your HUD will vary depending on the type of game you’re making and the information you want to display to the user.
A Graph Field can be used to represent player health as a pie chart or a horizontal/vertical bar.
To have a Field retrieve the player’s current health, you can use the “Retrieve Value” and “Retrieve Maximum” Field Use Values and then select “Health” and “Maximum Health” (inside the Actor category) from the Use Value window. You can use the same process to display other Statistics (like Mana for example). For more information about Use Value scripting, click here.
A Text / Graphic Field can be used to display available funds as plain text.
To have a Field retrieve the player’s current held Item, you can use the “Retrieve Value” Field Use Value and then select “Graphic” (inside the Items/Magic category). When asked to select an Item, you can click on the Use Value button again and select “Equipment” (inside the Actor category). Note: You may need to tick the “Include All” check box at the bottom for it to be listed. To retrieve the player’s current equipment, select “(Main)” and then select “Weapon” from the Areas of Equipment section.
You will also need to use the “Retrieve Visibility” Field Use Value to ensure the Field is only visible when an Item is actually equipped. To do this, select “Not Equal” (inside the Structure category) and set “Value 1” to the player’s equipment (as seen above). Then set “Value 2” to “(Value)” (second item in the Use Value window). This will check to see if the player’s equipment is NOT equal to nothing and if so, show the Field with an image of the currently equipped Item. For more information about Use Value scripting, click here.
A Text / Graphic Field can be used to display a high score as plain text.
Use a Global Variable to store the player’s high score. You can then use the “Retrieve Value” Field Use Value and select your Global Variable from the list at the top of the Use Value window. For more information about Use Value scripting, click here.
Menus are used as a means to navigate to different parts of your game. When you start any game, you are typically greeted with a Main Menu which directs players to start a new game, load an existing save file and exit the game completely.
To set up a Main Menu, you’ll first need to create a new Interface and use the “Introduction” System Trigger, along with a “Show/Hide Interface” event (under the Interfaces category of the Script Editor) to have your Main Menu pop up as soon as your game loads.
Inside the Interface itself, you’ll need to create at least three separate Fields that will act as buttons to start a new game, load a saved game and exit the game completely.
Start New Game
The opening of any game is going to be slightly different from someone else’s. You may decide to open with a cutscene to tell your story or just plop the player straight in with no exposition whatsoever.
One thing you will likely do however is turn off the Main Menu, which can be done using the “Show/Hide Interface” event (under the Interfaces category of the Script Editor). You can then use the “Position Actor” event (under the Actor category) to move the player (“Main”) to a Map where the player can begin their journey or watch a cutscene play out.
Open Saved Game
To check if the player has a save game, you can use the “Save Game Exists Branch” event (under the Game category of the Script Editor). If a save file does indeed exist, then you can use the “Load Game from Slot” event or the “Show Load Game” event to display the default Load Game Interface.
If no save game is present, you can simply repeat the same steps taken in the “Start New Game” section above. You can use the “Activate Field” event (under the Fields category) or create a Custom Event so that you don’t have to copy/paste existing scripts (which can become tiresome when you decide to make changes).
Alternatively, you could use the “Save Game Exists Branch” event inside the “Player enters” Interface Trigger instead and simply use the “Enable/Disable Field” event (under the Fields category) to prevent the button being clicked, if no save data is present.
To exit your game completely, use the “Quit Game” event (under the Game category of the Script Editor). Before exiting, you may want to save the player’s current progress first. To do this select the “Save Game to Slot”, “Show Save Game” event (which will bring up the default Save Game Interface) or the “Save Setting” event (under the Variables / Switches category) for those looking for more precision in the types of data they want to save.