How to show/hide HUD
I want to implement an ammo counter that when the player presses a key, lets say M, the ammo number will appear on the HUD for a certain period of time before dissapearing. I have attempted it, testing it out with a print, the print works but the actual drawing onto the HUD bit doesnt any ideas?
asked Jun 26 '14 at 10:23 PM in Blueprint Scripting
There is a simple way to do this
First, when press your "Show Ammo" key, open on a bool
Then remember, if you want to draw any thing on screen, you should use "Event Receive Draw HUD"
Set a branch, if "Show Ammo Number" is true, then draw a text and set a Delay depend on how long you want the text to show.
Until delay complete, close the bool. The text will disappear
answered Jul 25 '14 at 05:28 PM
Have you tried making this into a function that is called during the update tick for the hud and at the beginning of the draw adding a condition check? Anything that is skipped on the update draw tick will be erased there after. You could be causing a draw flood to happen since as u hold the key down you are issuing a draw command and could be flooding the draw event. That's one reason why it takes a while to vanish.
answered Jun 26 '14 at 10:46 PM
Hello here is a great tutorial on how to do this, credit goes to tesladev
answered Jan 17 '15 at 07:48 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here