General problem with creating HUD

Hi,
I’m a beginner working on my FPS shooter. Everything I did (walking, shooting, picking up weapons etc.), I did in C++. And now I decided to make a simple HUD, which should display some basic info like how much ammunition I have. I already made a simple HUD when I was doing pong game, but then all I had to do was to display points to the player. And I did most things in blueprints. Now, I don’t really know what to do. For example, I have two weapons, and each of them has its own ammo type. I created UActorComponent named UPlayerEquipment to keep track of the total ammo number I have. That number changes everytime I reload my weapon or pick up ammo box. But I don’t really know how to bind this number with text in HUD. Especially when I need to display different numbers depending on the weapon I currently hold. And, I would like to display how much ammo I have in my weapon right now. And that number is stored in my weapon class, not in PlayerEquipment. So again, I need to somehow check, which weapon I’m holding right now, and then access its variables. Another problem I have is that while I have a pointer to my character, and can choose PlayerEquipment from its properties, I can’t access PlayerEquipment’s variables. So, could someone point me in the right direction or do anything that could help me? I would really appreciate ANY help.

+Thank you for the answer. I alreay tried using BlueprintReadOnly for variables and BlueprintCallable for functions, but it didn’t help me much. I still didn’t (and don’t) know how to change binding between HUD elements and weapon’s variables depending on the weapon I’m holding. And I’m using child BP classes, but mostly for setting different meshes or positioning something. With this project, I wanted to learn how to do things using C++, so everything a player can do is made in C++.

I finally managed to make my variables visible to the UE4. It took me a few restarts, but other than that all I needed to do was to declare some additional variables inside my base weapon class and make them BlueprintReadOnly. Thank you for your help.