Download

blueprint flashlight issue. please help!

Hi I am a preaty new developer and I am trying to make a short game for pc.
my problem is this. when my player starts I dont let him use the flashlight right in the begining. so after he collides whit a trigger, a Bool is set to true and it will let him use the falshlight whenever he wants. but after he collides whit the trigger the flashlight function just stops working, nothing happens the string wont give information either. can somepne tell me what I am missing

36c8c7c665f9e7bea520ccb795ba9bf547342008.png

One of two things is happening. Either your cast is failing (Which is unlikely if gabriel walks into the trigger), or that Destroy Actor node is causing problems. Why are you using destroy actor? That would be trying to destroy the level blueprint.

I added that later becouse I thought it would help but now I know it wont. so the Destroy actor is not the problem, then what is the problem?

Does the print string for ‘Flashlight not equipped’ ever print when pressing the input?

heres something very funny. I puted a print string at the end of set visibility and that was printet just perfect but the light wont activat

hold on I found the problem. I am not supposed to use Set visibility I am suppose to use TOGGLE visibility

You can use “SetVisibility”, but you should make sure to set “New Visibility” to ‘true’. In your screenshot, you have i set to ‘false’, so you are
making it invisible all the time :stuck_out_tongue: