Game Maker
Features

Custom GUIs

Design your own interactive menus and interfaces for your game.

The GUI Module allows you to create custom graphical user interfaces (GUIs), like chests or menus, that players can interact with. You can use these for class selection screens, shops, information panels, teleporters, or any other interactive menu you can imagine.

Manage your GUIs in /editmap -> GUI.

Creating a GUI

  1. Navigate to the GUI menu.
  2. Click "Create GUI" and give it a unique name.
  3. This opens the GUI Edit Menu, which shows a visual representation of your GUI.

Editing a GUI

The GUI Edit Menu lets you design your interface visually.

  • Layout: The top part of the menu is a grid representing your GUI. You can place items here directly from your inventory by picking them up on your cursor and clicking an empty slot.
  • Rows: Change the number of rows in your GUI (from 1 to 6).
  • Name: The title that appears at the top of the GUI window when a player opens it.
  • Icon: The item that represents this GUI in other menus.
  • Close Function: Optionally, you can select a Function that will automatically run whenever a player closes this GUI.

Making Items Interactive

Each item you place in the GUI can be made interactive. Clicking on an item can trigger a sequence of actions.

  1. Click an Item Slot: In the GUI Edit Menu, click on any item you've placed (or an empty slot to create a new item).
  2. This opens the Item GUI Edit Menu.
  3. Here, you can assign a Function to different types of clicks:
    • Left Click Function
    • Right Click Function
    • Shift Left Click Function
    • Shift Right Click Function
    • Drop Function (when a player presses 'Q' over the item)
  4. You can also edit the item's appearance using the Item button, which opens the full Item Builder.

Opening a GUI

To show a GUI to a player, you must use the Open GUI action, typically triggered by an event like a player interacting with an NPC or a block.

Example: A Class Selection Menu

  1. Create Functions: Create three functions: SelectWarrior, SelectArcher, and SelectMage. Each function should contain the actions to give the player the appropriate gear (e.g., using Set Inventory Layout).
  2. Create a GUI: Create a GUI named Class Selector. Set its size to 3 rows.
  3. Add Items: Place a diamond sword, a bow, and a blaze rod in the GUI. Give them appropriate names and lore.
  4. Configure Items:
    • Click the sword, go to the Item GUI Edit Menu, and set its Left Click Function to your SelectWarrior function.
    • Do the same for the bow (SelectArcher) and the blaze rod (SelectMage).
  5. Create a Trigger: Set up an event to open the menu, for example, a Player Join event.
  6. Add Action: In the Player Join event, add an Open GUI action and select your Class Selector GUI.

Now, when a player joins the map, the Class Selector menu will open, allowing them to click an icon to receive their chosen class kit.