Boolean not setting to true

I am creating a project that at the end of the level will display stats from the game. The issue that I am having is that it is checking whether or not the player collected and item. I have 2 Booleans that check to see if that item was collected or not and when I pick up the sword it shows that I collected it, but when I pick up the helmet, it tells me that I didn’t pick it up although it shows to the screen that I did. I have the events bound to say yes or no depending on what the bools return. So since it is telling me ‘no’ when I end leads me to believe that the bool is not being set from false to true. I’ve tried adding a delay with no success. I have taken out the destroyActor node and that was unsuccessful. Any help would be greatly appreciated.

EDIT: I put a branch onto the helmet script and it is being set to true but for some reason my widget function isn’t seeing that it’s true. If I set the default value of the bool it will work say ‘yes’ at the end whether you have it or not.


Hello MjLynch123,

You are looking for an actor that you have destroyed before. So it can’t find the variable, so it can’t check if it is True or False.

2 Likes

Would using destroy component work then for the helmet itself because everything is tied to the collider or would it be the same thing?

1 Like

The best is to place your variable in your player BP. So you can destroy the helmet without affecting the variable.

2 Likes

That worked great! Thank you!!

1 Like