Flash light that can't be switched on unless battery is above minimum charge?

Hey guys!

I have a flashlight that’s part of my character blueprint for which I want the following:

  1. It should turn on and/off when I press “F” - Done
  2. It should drain battery power when on - Done
  3. It should slowly recharge battery when off - Done
  4. It should automatically switch off when battery is empty - Done
  5. It should not be able to turn back on until battery charge is above a certain level - This is what I need help with.

As it stands, the flashlight can not be switched on when the battery is below the minimum charge level, but neither can it be switched off when it is already on. Any ideas how to go about achieving the first part, without the second happening? I’ve tried using a branch on only the A output of the Flipflop node, but then it only ignores the first time the button is pressed, but the second press turns the flashlight on, because the second press activates the B output, and thus bypasses the branch. So that didn’t work.

Any help/thoughts will be greatly appreciated!

Did you ever get the answer to this? If so could you please post the updated blueprint please?

i have the solution to this but its a long and complicated blueprint i can make a tutorial but only if you want me to

i will upload a tutorial now

Yeah I figured it out eventually… Was not that complicated actually.

First I got rid of the FlipFlop when I figured out I didn’t need it. It was also causing problems with this aspect of the blueprint, as it switches every time you press the button, whether or not the flashlight could react to the first button press. Secondly I added a node to check the visibility of the flashlight object as a second condition for the flashlight to be toggled. Now it works like it should. You can turn it off when the remaining power is below the threshold, but only turn it on again when the remaining power is above the threshold.

Here is the updated blueprint…

your blueprint seems to be much larger than mine. hmm but i see how your method would work i will still upload my method (video) just in case anyone who is looking for a different method

A tutorial would be brilliant so I can understand the process, thank you.

here is my tutorial to construct a battery operated blueprint

i have put down a answer with a link to my tutorial video sorry if i sound off im new to giving a tutorial faze lol

Thanks for throwing that tutorial together mate! Nice to have people like you helping the rest of us. Mine recharges over time as well, which adds another branch. I also have some delays in there to control the discharge and recharge speeds. Makes it easier to adjust when play-testing. And then where you have the press G thing to recharge, I have pickups. But that part doesn’t show in the above blueprints. One thing I probably should mention is that I created a flashlight input in the project’s input settings which is mapped to F by default, but can easily be changed without heading into the blueprints.

yh i noticed that you put a input in for it, and i thought about doing the tutorial that way but not a lot of people know about the input settings so i thought i try and keep it simple

I think you misunderstood dude. Wanted a flashlight to recharges by itself (when off) without needing to put batteries in.

Any chance I can see the full BP for it please @Verskriklike Frik? You have a few connectors that aren’t showing where they go to in this image.