# Battery operated flashlight whose intensity decreases with time

**URL:** <https://forums.unrealengine.com/t/battery-operated-flashlight-whose-intensity-decreases-with-time/399478>\
**Category:** C++\
**Tags:** unreal-engine, flashlight, UE4, CPP, question\
**Created:** [June 30, 2017, 5:37am UTC](https://forums.unrealengine.com/t/battery-operated-flashlight-whose-intensity-decreases-with-time/399478 "2017-06-30T05:37:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4ae46b6d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4ae46b6d](https://forums.unrealengine.com/u/anonymous_user_4ae46b6d)\
**Post date:** [June 30, 2017, 5:37am UTC](https://forums.unrealengine.com/t/battery-operated-flashlight-whose-intensity-decreases-with-time/399478/1 "2017-06-30T05:37:55Z")

</div>

Hey people. I’m new to programming and I wanted to ask you guys that how can I make a battery operated flashlight whose intensity decreases with the decrease of battery life? If someone can just give a C++ code for that, that would be great.

---

<div class="post-metadata">

**Author:** ![Ninjin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ninjin](https://forums.unrealengine.com/u/Ninjin)\
**Post date:** [June 30, 2017, 11:55am UTC](https://forums.unrealengine.com/t/battery-operated-flashlight-whose-intensity-decreases-with-time/399478/2 "2017-06-30T11:55:41Z")

</div>

Does this help for a start? \<3

[Flashlight in C++](https://answers.unrealengine.com/questions/603041/simple-flashlight-c-script.html)

---

<div class="post-metadata">

**Author:** ![Ninjin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ninjin](https://forums.unrealengine.com/u/Ninjin)\
**Post date:** [July 8, 2017, 12:37am UTC](https://forums.unrealengine.com/t/battery-operated-flashlight-whose-intensity-decreases-with-time/399478/3 "2017-07-08T00:37:25Z")

</div>

Hey, could you make something work with the tutorial I’ve send? Would be great to hear back and if there is no more questions, please make sure to checkout your question! \<3

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/3/9d36be1f6354752526f656c9f70457a244fdbe53.png)
