Controlling NPCs with UI in UEFN
The Verse Commander minigame has the following UI:
- Character Commands: These buttons map to commands for the NPC (Forward, Turn Left, Turn Right). Selecting one of these commands adds it to the list at the bottom of the screen.
- Execute: An Execute button that tells the NPC to perform the queue of commands at the bottom of the screen.
- Remove: A Remove button that removes the last command added to the list.
- Reset: A Reset button that resets the current board and clears out the command queue.
- Command List: A dynamic list of commands that grows when a player adds commands and shrinks when a player removes commands.
The UI is all implemented in Verse. Check out Creating In-Game User Interfaces to get started with Verse UI and understand how it works.
The sections below describe how to create the custom buttons and dynamic UI used in this game.
Creating Buttons
The buttons are created in their own class, minigame_button, that handles their look when they’re activated or deactivated. We used a quiet button that overlays a horizontal stackbox with the text and icon, which then overlays the background. This creates the effect of a custom look for the buttons while maintaining the functionality and responsiveness that you get with the default button design in Fortnite.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.