Using widget with level blueprint?
I am trying to make a widget that will count up from inside the level blueprint! could someone point me in the right direction?
I am trying to add a +1 every time something happens inside my level blueprint and would like to display the widget inside the game..
asked Mar 08 '17 at 01:22 PM in Blueprint Scripting
I have worked it out myself!!
Thanks to this youtube tutorial https://www.youtube.com/watch?v=_CV_Sg3Ffw8&t=187s
Instead of casting the game mode after his barrels are destroyed in the video, I done it so it casts the game mode and the custom event inside the level blueprint where I needed to add a +1 to the widget!
For example I needed this for my wave system which is done inside my level blueprint and after the wave has ended it adds a +1 to my wave counter widget!
Hope this helps anyone else that is struggling with this :)
answered Mar 08 '17 at 03:00 PM
Is there a specific reason why you want to use the level blueprint for that?
I never tried to use my level blueprint to tell something that something else happened. I think the game mode, game state or game instance would be a better catch, because you can always get the game mode, state or instance. You can also set a specific game mode or game state for each level, so you are also able to split informations if needed. As far as I know you can also use game instance for that, but the game instance is preserved all the time as long as the game runs.
If you store your information in said blueprints, then you can go into your widget, get the game mode/state/instance, cast to the one you want to use and then get the information you need.
answered Mar 08 '17 at 02:42 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here