Need help getting boolean variable to work with media
Here's what I want to achieve:
1- TV is off when starting the game. 2- You can trigger the TV On after you enter the trigger box and pressing E. 3- After the media finished playing, TV will turn off automatically (I've noticed performance hit while media is on).
Here's where the condition comes to play: A = If TV is still playing, pressing the button again will turn off the TV. B= If TV is off, pressing the button will turn on the TV.
Right now I'm using a flip/flop method where it basically always attempts to turn the TV On then Off, so even if the media finished playing you'd hear the "switch off" sound: https://imgur.com/a/JK6xS
I've tried using a branch and variable + condition, but I couldn't get it to work even after trying to connect to several nodes and trying different options for the boolean condition, it usually just tried to turn on the TV for me and doesn't give 2 conditions, most probably a silly mistake I'm doing with variables (I'm still very new to UE): https://imgur.com/a/o8Ey6
Any help to get this properly working would be much appreciated!
asked Sep 02 '17 at 03:41 PM in Blueprint Scripting
When it finishes due to the end of the media, it doesn't trigger your flip/flop, so the next time you push the button, it will be reversed. The same goes for your variable.
answered Sep 02 '17 at 10:00 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here