Flashlight and Suite power

What I’m wanting to so is that I setup and node and pins for when the user when he/she presses L that this turns a light (flashlight) on and off. Here my code.

http://prntscr.com/wbo495

The next node setup is when it runs as the player plays the game. The idea is to let the Suite Power decide if the light can even turn on. If it can turn on. This with a delay.
It removes so much power from the suite power until the player turns the light off or the suite runs out of power.

http://prntscr.com/wbob9f

Thanks
Iceman11a

After testing and watching run. The 1st screen shot, The nodes seem to be working. It’s just it doesn’t turn the light on.
and the 2nd screen shot I took. It seems like the whileloop ends and there’s no count down for the suit power. I made some changes to it. and with the same results.

http://prntscr.com/wbxmy9 I don’t think that the adding an images works like it should.
I think the issue is in the while loop sense it ends too when the suit power is still full or has some power still left.

After doing some testing and watching the nodes fire. It not a node issue. It looks like the spot light doesn’t come on. Can’t figure it out. I’m using eu4 4.24.3. has any one else had that issue or still have this issue.

I am using a spot light on our flashlight and it works perfect.

Sorry i am not using bp, mines all c++

Here’s a quick BP using events and a timer.

I’m using a timer to drain power because tick is FPS dependent. Someone playing at 120 FPS (ticks) will consume 2x as much power for the same time interval as someone running at 60FPS.

Power draining should be based on a strict time interval. You can use tick delta to become FPS independent, but it adds to the math logic. Set timer by Event/Function is just easier.

Over Drive, Thank you very much. I never seen any thing like this before. It does work. 1 question. In game when I turn that light on. The light it self doesn’t come on. Look at this. I should see the light on the wall. and there’s nothing.

http://prntscr.com/we12lf

That’s the next issue I have. Thanks again for the node and pin setup.

Your welcome. I like Event driven flow. Straight forward and easy to read…troubleshoot.

I’ll run mine and see what I can come up with. In the meantime what are your spotlight settings?

@iceman11a Instead of using “Set Visibility” I changed it over to “Set Intensity”. Works fine.

Other than that you may need to turn off “Use Inverse Squared Falloff” … Details -> Lighting (extended)

Yes, That’s video is just what I want to do. Now only if I can figure out why the light is not on. Or why I can’t even turn it on or off. @Rev0verDrive I made a new game and added the spotlight in and it worked fine.

Hey, I got an UPDATE:. It works. I just forgot that one I forgot to set. Set Visibility, I forgot to check the box. New Visibly. How bump can I get.

Practice and usage my friend. I’ve been using UE since the 2.0 days. You’ll get it, but it takes time.