News:

Do you enjoy all things anime and role playing?  Come on in and take a seat!  Create a character, and let's have some fun! (PS:  Bring your friends, please!!!!)

Main Menu
7 Guests, 0 Users

avatar_Senkusha

How To: Set up a (Persistent) Heads Up Display (HUD)

Started by Senkusha, Monday, April 01, 2024, 17:43

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Senkusha

One the first things you're going to want to do after you get your character in the game is track it's Health Points.  I've made a simple GUI (Graphical User Interface) already.  This tutorial is going to show you how to add it to the Viewport so that it's always on, AND, it's also going to get rid of that annoying "Left Click to Engage the Game" problem.

So the first thing you're going to need to do is create a new BluePrint.  I called mine MasterHUD.
1.  Off the Event BeginPlay node drag off and left click on an empty space.  type in Create Widget.
2.  Fill in the Class Name with your User Interface widget.  Mine was called W_Character_Info.
3.  Then drag off the Return Value and Promote to Variable.  Type in the variable name.  Mine was named HUD_Ref.
4.  Drag off the Execution Pin and type Add to Viewport.  Set the Target to HUD_Ref.


5.  Drag off the Execution Pin and type Set Input Mode Game Only.  Drag off the Player Controller and type in Get Player Controller. (This step is optional.  This is the critical piece that will disable that initial left click to start the game play.

Your Blueprint should look something like this:
Mouse_1.png


Favored Class:  Magical Girl