How is this Boolean showing as false???

(upload://qoGih3fTZc6U2ZMxrjtbhJlzFut.jpeg)

Hi there,
This is driving me crazy. Answer is probably simple but I can’t see it. This is simply two doors and I want them to light in sequence. Door 1 is supposed to light before Door 2 can be lit. But for some reason, if Boolean is set to true after Door 1 is triggered (it is initially set to false), it doesn’t register as true when Door 2 is triggered. I have tried many things and nothing seems to resolve this. I have tested this over and over again and once Door 1 is triggered, the Test boolean shows as true as if set properly. But over on Door 2’s setup, it shows as false. It doesn’t seem to matter how I pass the Boolean, it keeps showing as false for some reason. Any suggestions would be forever appreciated.


FWIW, this way works, so it appears that it has something to do with the Event Begin Overlap, but I have no idea why.

Do they both contain this code?

Then both doors are doing the same thing…

You need to set the door number as a variable on each door. One door = 1, the other = 2.


Thank you for looking at this!!

Hard to see from the image, but each door is set to a different value. Door 1 is 1 and Door 2 is 2.

I have tested the door variables alone and it works. The problem I am having is once the Boolean is set to true on the first door, it reverts to its default value, which is false. It doesn’t seem to hold the value.

I have tried this with on Event Overlap and even On Clicked, and it doesn’t seem to hold its value once it is set to true. The exception to this is when I do it by Keyboard press, it seems to hold.

It just doesn’t make any sense to me.

Thanks again for looking at this.

Is this the pawn or the door bp?

Thanks for looking at this. It is just a BP Actor Class with a door frame static mesh that generates an overlap event. Each instance is assigned a door value. When I test the logic for the door values alone, it works as expected. Door 1 will only open if 1 = 1, Door 2 will only open if 2 = 2, etc. The issue is when the Boolean gets set as true by the first door, it doesn’t seem to hold its set value and reverts to false for the second door instance. When I do other testing to see if Booleans hold their value, they hold, just not in this case for some reason.

Thank you.

In case this is what you are after, this could work for you door bp:

Make the pointer variable as instance editable so you can assign it a value:
image

Now all you have to do is assign the respective values to be triggered in order:
TriggerInOrder

Hope it helps.

1 Like

Thank you so much. Very helpful!!!

2 Likes

Got this working perfectly, so thank you again. Couldn’t have done it without your input!!!

1 Like