Devlog3- Vivianne Zsoldos-- Player UI (PauseMenu, InventoryUI)
For the end of month 1, I was able to add a few more features. This week, I added a Pause menu, a compass, a map and updated my previous Inventory Hotbar.
PauseMenu-
Problem(s)-
The only real problem I had was adding our Pause menu. For some reason, I couldn't call the widget from my GameInstance, and I wasn't sure why. It should've been really similar to when you call the Main menu. Once I finally had it to where the player could see the menu, the game wouldn't stay paused and when it did pause... it didn't unpause. It was just a whole mess. Finally, I wasn't able to (still true...) use "Escape" to quit the game. I believe this is because of Unreal's editor settings. I've changed this numerous times, but I've had no luck. To move on, I currently have the input for the menu to be "Q". This isn't necessarily a problem, but it's super unusual for the Pause menu to not be activated on the "Escape" key.
Solution(s)-
I learned that Unreal has some functions associated with creating a Pause menu. However.. It changes the inputs of the game. If you call PlayerController->SetPause(), it actually locks up the player. By this, you were so locked up that you can't even move your mouse to get out of the menu. This actually paused the player. I found a way around it by using FInputModeUIOnly and SetWidgetToFocus. This allowed the game to pause in the background and the menu to still be the active screen. I also needed to use bShowMouseCursor. All of this aside, I also needed to add the buttons for the menu to be functional. Just like the Main menu I created earlier, I called these buttons and created delegates for them. I actually used the same delegates I created earlier from my GameInstance code.
The other features I added were fine and I was able to add them with ease.
Compass/Minimap-
For my compass and minimap, I didn't want the user to be overwhelmed with UI all over the screen. I also have several bars to show the player's stats. Because of this, I decided to combine the 2 items and add the minimap within the compass.
The compass was the more challenging of the two. I had a widget of a compass that was made and added that to my PlayerHUD. I had to do some Blueprints to have the compass move based on the rotation of the player. This way, the user can always know which way is North. To add the minimap, I added a new Springarm and a SceneCapture2D component. I took the SceneCapture comp and made a material from it, so I could be able to call it from the HUD. I took an image and sized it based off my compass center, and added the Scene material. I will say- Unreal doesn't do a good job at letting you adjust the shape of images. To elaborate, the center of my compass is circle and when I wanted to add the minimap, it looked funny because it was a square inside of the circle. I needed to go inside of the material of the Scene comp and edit the shape of the material to have rounded corners and look like a circle. That way, when I added the material onto my square image on my compass, it fit perfectly.
InventoryUI-
I've worked on the Inventory Hotbar previously, but I feel like I made a pretty huge change. Instead of a bunch of images being placed into a horizontal bar, and have to manually add numbers to show "1-9", I made some code to do that for me. I also added some "InventoryCell" widgets to be placed into the bar. Within my code, I have the cell replace an image for an icon, list the slot number, and to show the player how much of a certain inventory item they have. This will help them keep track. By adding these cell widgets, I don't need to add anything else to the bar. I simply just need to drag another cell in, and the code will do the rest. I will still be adding more features to this later (by being able to drag and/or click items out of it) but for now, this is a nice quality- of- life update.
**Images are above **
Get Echoes of Creation
Echoes of Creation
Status | In development |
Author | FrogBoots |
Genre | Survival |
Tags | Crafting, First-Person, Singleplayer |
More posts
- Devlog 3 Drake Curry: Breakables v2, Navmesh, Enemy AI9 hours ago
- Devlog 3: Jazmine Chargualaf: Reworking Item Colliders & Setting Up a Sound Syst...11 hours ago
- Devlog 3: Derrick Domena-Guzman: Data Oriented Building Menu, Showing Building P...16 hours ago
- Devlog 2: Jazmine Chargualaf: Weapons, Tools, and Crafting System6 days ago
- Devlog 2 ~ Drake Curry: Level v2.0 and Learning Pains6 days ago
- Devlog2- Vivianne Zsoldos -- InventoryUI (Started)6 days ago
- Devlog 2: Derrick Domena-Guzman: Improved crouching, and functional stamina bar6 days ago
- Devlog 1 Drake Curry: Level Design, Breakables, Pickups13 days ago
- Devlog1- Vivianne Zsoldos-- Player UI (Main Menu, Player Stats)13 days ago
Leave a comment
Log in with itch.io to leave a comment.