Casting To UI Widget
I have created a HUD with an oxygen Bar on the left and a Box on the right. https://i.imgur.com/j3G74Nq.png
I have connected the oxygen bar to my player health using a binding. As time in the game goes on the oxygen gets lower. I have done so using this. Setting Player Health to drop over a timeline. https://i.imgur.com/TisJLbo.png
Casting Player Health into the HUD binding https://i.imgur.com/ABpR9nS.png
It works well and the bar in my HUD lowers over time. Excellent
My Problem: I am attempting to create a blueprint actor that when collision happens plays a sound and then stops. When this sound plays I would like an image to appear in the hud.
So I created a box that when overlapped it plays the sound and starts an interpolation between two variables. https://i.imgur.com/t8Ybg4j.png
I want to use this interpolation variable to control the image being displayed on the HUD. So I want to bind the the alpha of the image. My first step is to get the casting to work before attempting to attach to the alpha only.
This is the part where I get stuck.
I currently have https://i.imgur.com/hEFGFqj.png
My Problem is that I can't find what I should be plugging into the Cast to BP_Sound as the objective.
Am I casting properly?
asked Mar 14 '18 at 03:10 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here