I have a very simple setup of 2 cillinders that are overlapping. One is about 5 meters and another one is about 0.5 meters. I setup a mechanism that if i enter a triggerbox i am able to click it and when i click it the 5m version gets hidden so only the smaller actor remains visible.
Now what i want in the HUD is a way to have a string/variable be displaying the amount of times that conversion has taken place. (note in my scenerario it can only occur once since i have no respawn mechanism) How do i get the variable i use in my hud to be able to get a +1 in the level blueprint section? (i have tried with the same blueprint used in the level blueprint but they fail to respond)
See setup attachment
Thanks for your question! For what you are trying to accomplish with updating a counter variable that is read by your HUD, what you will likely want to do is keep that counter stored either in your Character blueprint (ideally) or a placed blueprint in the level. Your HUD blueprint could then call that variable’s value from whichever blueprint you are storing it in every tick of of Event Receive Draw HUD by using either Blueprint Communications or a Blueprint Interface.
Check out those two documentation links and if you’re still unsure of what to use or hit any problems getting this setup, reply back and we can go into a little more detail.
Thank you very much!!
I fixed it by creating a blueprint interface of xp → creating a function of it. Then i made an easy +1 for every click on the tree and stored it in the blueprint interface in level blueprint.
Finally linked the xp blueprint to my draw hud text in the HUD blueprint and now it is done.
Thank you so much!