Let me start by saying that I am very new at this, but I am willing to learn. In short teach me, and I will listen.
I have a very simple game, a green ball and red ball are in a closed arena, the player controls the green ball, and chases the red ball. When the player hits the red ball, I would like the score drawn on the screen.
I think I have all this setup correctly, however I am failing at getting a value passed to my HUD BP. Attached are some .PNGs of what I currently have, I look forward to finding out just how far off the mark I am.
Let me know if you need more information, and thank you for your time,
I think I have. Attached is a .PNG of the details panel of “TargetRefEmenyBP”.
However, the second part of the link you referenced “Specifying the Blueprint Instance” I have not done. I cant seem to get the HUD_BP to display details in the Level Editor. I suppose I should have mentioned that in my first post, sorry. I have also attached a picture of the Level Editor, with the HUB_BP selected and empty details panel. Perhaps I missed something there?
Then set the enemy reference in the HUD you just got to “self”. It’s a bit circular, (your enemy now needs to know about the HUD, and the HUD knows about the enemy) and there is almost definitely a better way to do this, but I think that’s what I’d do.
No, that’s fine, I was just checking for my own sake. I’m not so good with HUDs and widgets, so I wanted to be certain
You’re almost there: now you’ve got the HUD when your enemy spawns, you should be able to drag a pin off of the “As HUD BP” and there should be a node for Set TargetRefEmenyBP that appears in that list. Use it, passing in a self reference.
Just as information, what we’re doing here is, when the enemy spawns, it grabs the HUD instance associated with player 1 (or zero - I have no idea how multiplayer works), and we’re setting the enemy that that HUD requires to be the one that just spawned.