I added flashlight to my first person character and made blueprint for my flashlight which is placed in map. I made interaction key as E and flashlight input as F. As I enter flashlights triggerbox text appears and when I leave it disappears. How do i disable flashlight from working until I have picked it up from map?
First make a bool Variable in your Character call it “IsFlashlightPickedUp” and make it Editable. After your F Input event make a Branch and put this Variable in. On the True execution node follows your flashlight enable logic. Leave the False empty.
Before you call Destroy Actor. Get Player Character and Cast it to YourPlayerCharacterBPName drag out the wire from the blue Pin and type “Set Is Flashlight Picked Up” you get a node set the Check the checkbox there. Wire up the white Wires and make sure Destroy Actor is the LAST node.
Good Luck and Have Fun =)
Thank you for a quick and helpful reply I will…
Let me know if you got any Problems with the BP =)
Works like a charm. Thank you so much :))
Glad I could help you out
Accept his answer for tracking purposes