C++ Battery Collector: Creating the HUD Blueprint | 17 | v4.9 Tutorial Series | Unreal Engine

preview_player
Показать описание
Now that the code is set up to work with Widget Blueprints, create a Widget Blueprint to display the Character's power in the HUD.

(00:05) - Recap & Fixing Compile Errors
(01:58) - Creating the HUD
(05:54) - Creating a HUD GameMode Blueprint
Рекомендации по теме
Комментарии
Автор

My health bar wasn't showing up until I went to world settings and set Game Mode > GameMode Override > GameMode_BP . This doesn't make sense why it would cause it to start working though, since project settings is supposed to set the default game mode. At least that was my understanding of project settings.

roberthinds
Автор

4.25.4 i love this game.. heheh SO MUCH SPEED... it is like UE4 Sonic Bot. Works Great still Just mostly headers. \Pretty much the comments clear it all up to this point easy p_easy. Claps Claps, good job everyone for trying to keep this up to date with Comments... Just I use Game Mode and not Base... i just made a new C++ GameMode not Base.. and that seamed to be the only hiccup Until this point. Check your Spelling, Make sure you Getters are Getting what you really want.... lol i did a GetMontage instead of GetPower once lol. Claps Claps You Awesome Peoples.

kitcoo
Автор

Getting an error when compiling; "Your life is not valuable enough to utilize this code."
What does that mean? Am I doing something wrong? Does the engine just not like me? I feel like that was kinda mean....

tommyd
Автор

2 Issues so far:
1) If i don't set the PowerToWin variable in the blueprint, the Progress Bar won't ever fill (I suppose because CurrentPower divided by 0 won't work?)
2) Even if we previously set CharacterPower=InitialPower, where Character Power isn't editable from Blueprint but InitialPower isn't, I supposed that by changing InitialPower inside the Blueprint would affect CharacterPower during the PlayMode. This doesn't happen

roboknobthesnob
Автор

beautiful voice, i can listen to this all day. oh yes nice tutorial cough.

xxcarlosxxmunosxxz
Автор

So I have the problem with C2027 use of undefined type UUSerwidget and the CurrentWidget-> AddToViewport(); displays error. I've tried to include all the headers and made sure that the BatteryCollector.Buiild.cs is identical. Another problem however, is that I cannot Generate visual studio project files as many of u say is the solution. So my question is why? What happens when I try to do it is that it just stops and nothing happens. Later when I try to open the .u file it cannot be opened due to the UUSerwidget error. Any tips or help is appreciated.
The header im using is #include and is placed both in the BatteryCollectorGameMode.CPP and the BatteryCollector header. I include the header in all CPP files.

kastanjkastanjen
Автор

Compiling the code throws an error: Intellisense: cannot open source file "Blueprint/UserWidget.h"

I located UserWidget.h inside UE4 source files and added it as an include:
#include but it still won't compile without errors. Any idea? I'm using 4.9.2

channieonline
Автор

I'm getting an error - This blueprint(self) is not a BatteryCollector Character, therefore self must have a connection. This error is from BatteryHUD.

EL-gzsh
Автор

I cannot get GetPowerToWin to come up when I right click in the blueprint screen. I have it defined as follows:

/** Returns power needed to win - needed for the HUD */
UFUNCTION(BlueprintPure, Category = "Power")
float GetPowerToWin() const;

And here is the implementation:

float const
{
return PowerToWin;
}

I have tried closing and re-opening the project and that does not work. Any insight would be appreciated.

Michaellh
Автор

Hey, everyone.

I'm trying to follow this tutorial by using Xcode 8.3.2. I have the seam error that all people mention on the comments : `Error: Class 'UUserWidget' not found.`

I added the dependency on `BatteryCollector.Build.cs`: string[] { "Slate", "SlateCore" }); And tried to regenerate the project using the terminal command : './GenerateProjectFiles.sh -game'. But the build is still failing.

Could somebody give me a hand with this. Thanks :) !

FabianRicardoR
Автор

Following the problem I mentioned in ep. 13, I think you should explain why BP of GameMode must be used. Without BP, there's no way setting the self-defined properties, here, i.e., HUDWiget Class

ec
Автор

the visual scripting for the Bar doesn't work. The nodes are the same/dont have the same pins. Please for the love of god update this series

mrduby
Автор

When will the full project become available?

MichaelGaskin