Could anyone help me to make a rechargeable flashlight , I want her to be blinking when it was certain % and when she got off she recharge alone
Hook it to a tick event. Get delta seconds and hook it up to a “switch” or a “select” or a “flipflop” node. Decrement (or increment when charging. Thats what the flow control node above is for) a “battery charge” variable based on a factor (charge/discharge per second) thats multiplies to delta seconds. Have a check somewhere that sees if charge is below the flicker threshhold. Make a timeline with alternating 1/0’s and hook the lightsources visibility bool to it. Play the timeline if its in the flicker battery range.
Oh, and clamp the battery charge to a min and max value to stop it from doing weird things like overcharging or overdraining
The flashlight is a SHE?
One thing to be careful about with event tick is that different players will have different frame rates, your flashlight would last twice as long for players running 30fos than those running 60. This is not a big deal for a single player game, but for multiplayer you should probably consider either adjusting the amount of frames based on your users fps or locking the frame rate at thirty or whatever value works for you. How ever I like the Idea of basing this system of frames, frame rate isn’t constant and neither are batteries in real life, the time your light would last will be different every charge which could be used to interesting affect.
Depends on what country you are from: people just translate from their language to English and you get these funny stuffs.
Well, theres the “delta seconds” output pin to help normalize FPS differences by converting each frame into “progression of time in seconds”.