I am working on a small count-down type script (triggered by hitting ‘G’) and wish to draw it to the hud using integer to string conversion, however I have hit a snag. every time I try to trigger it, it reaches the delay loop but nothing is displayed as planned, instead, when I exit the P.I.E and view the message log, I get the following:
“Canvas Draw functions may only be called during the handling of the DrawHud event”
and I guess my total question is, is there any way to circumvent this without moving everything over to the HUD blueprint?
(this is my first post, if you wish for me to expand on anything, don’t hesitate to do so)
Use the Player Controller BP instead of Level BP to set that Time variable. Then Get Player Controller > Cast to yourplayercontroller > Get Time in your HUD BP and draw text.
In that case you can do something like this;
- Create a bool and an integer variable in your HUD BP.
- Use the bool for a branch after Enet Receive Draw Hud.
- Plug your Draw Text node to True and then use the integer variable for the text.
- Now in the Level BP cast to the HUD BP like you already had, and then get the Set nodes of those variables from that cast.
- Set the bool to true, and set the time integer variable with that time variable you have.
also, forgot to add thanks for the reply, that was rude of me