UMG Tutorial bug: Displaying HUD point 4
I couldn't get it to cast to the type of object i wanted as per the tutorial.
asked Nov 15 '14 at 07:05 PM in Blueprint Scripting
Turns out something has changed since tutorial written.
The variable that you are setting in the MyCharacter blueprint is already of the right type so you dont need to cast it.
When you create the variable in the Widget (the max ammo variable) it is a local variable by default so you cant access it externally. So create that as a proper variable (rather than just dragging backwards in the graph) and then in the MyCharacter blueprint when you get access to the GameHUD as type GameHUD then you can jsut set it directly with no cast.
Hopefully i haven't broken the spirit of anything by making that variable non local.
answered Nov 15 '14 at 07:08 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here