Is it possible to have a certain button pressed when a certain boolean is set to true.
For instance:
I have a progress-bar for my flashlight-battery.
When F is pressed the flashlight turns on. when my flashlight runs out of power, the intensity is set to 0 and when a battery is picked up the intensity is set to high, and at last when the player presses F again, the battery stops draining and the flashlight is off.
Everything is working out just fine as it is right now but I want the game to force press F again to turn off the flashlight after the battery is dead.
so when the player puts in a new battery, the player has to press F again to activate flashlight instead of the flashlight turning itself back on.
would greatly appreciate any help and sorry for my mediocre english.
Your best bet here would be to create a function in your blueprint that does all the logic currently assigned to the F button press. Then, when you get that F button press event, call that function. Also, call that function when the battery runs out.
Can you post your solution? I am having the same situation and I cannot find another way around it, the function solution in just words, is not helping my situation.