hello,
Please help me, i am beginner in unreal engine 4.
i want to make a widget with some buttons.
at press a specific button, it will increment an score.
I did a blueprint bat i have a errors.
thank you for help
hello,
Please help me, i am beginner in unreal engine 4.
i want to make a widget with some buttons.
at press a specific button, it will increment an score.
I did a blueprint bat i have a errors.
thank you for help
Where is the Total Puncte variable coming from? It looks like itâs coming from your third person character blueprint, so if it is, you need to use a cast to get it. Right now youâre trying to set a nonexistent Total Puncte variable inside of the widget blueprint. Add a Get Player Character node and cast it to ThirdPersonCharacter. Plug the âAs ThirdPersonCharacterâ into the Target of both of the Total Puncte nodes. Should ix your problem.
Also worth mentioning, if you package your game, Print Text wonât show. Only in the editor. Iâd recommend adding text to the widget and updating that instead.
Each blueprint is an element in the game world.
Each element has a set of properties (functions and variables).
An element can access his own properties but canât access othersâ unless he has a âreferenceâ to another element.
In your case, you want your HUD to have a reference to your Third Person Character which has your âTotalPunctleâ property (variable).
There are several ways to get a reference to something, in your case my best guess would be : GetOwningPlayer (it will return a Controller), get the pin out of this and GetControlledPawn (it will return a Pawn), get the pin and plug it into a âCast to Third Person Characterâ node.
The âcast toâ node will give you an output pin referencing your Third Person Character blueprint.