By the way, isn’t that Flipflop totally useless? You’re basically saying: If A then “Toggle” and if B then “Toggle”. You could get it of it and have just the one “Toggle”. Surely?
HOWEVER. If you want the battery to drain, you would use “Toggle Visibility”. You’d use a node that sets the visibility (Can’t remember it’s exact name now).
This is so you know what mode you’re in. THAT’S when the Flipflop would be handy.
After that, You’d create a Bool (Yes/No) variable and call it Flashlight On? and another called “Out of Battery”.
You’d also create a float called “Battery” with a default value.
Now set the “Flashlight On?” to true after you turn the visibility to on and set it to false once you turn the light off.
You’d then have a “Tick” event and use the delta time and minus it against the “Battery” IF “Flashlight On?” is set to true. If false, you’d add it to the Battery float. ONLY IF Battery is < 500 (For example).
Then in the Tick, you’d see if Battery = 0. If true, then set “Out of Battery” to true. If not, then set it to false.
THEN if Out of Battery is true, you’d set “Flashlight On?” to off.
This sounds stupidly complicated, so give me a few minutes and I’ll create the BP for you.