Hey @NexUs. Made this quick demo to try and make it work how you want. It’s a bit different than the linked tutorial but think it could be of more help.
This is how it works:
The trigger actor
- Only component with collision is the Box, it’s set to Block All.
- Create a function to invert a bool and call a dispatcher:
The bool is set to false by default. Running this will set it to true and the dispatcher is so that any actor listening knows it was changed. - Since you are shooting the actor you can run the function on AnyDamage event:
The Door actor
- Create an array of reference to the lock actor:
Be sure to enable InstanceEditable so that the locks can be manually selected in editor.
- Create a function to bind the dispatcher of the actors added to the lock array:
On the create event node select Create Matching Function. This will generate a new function. - On the generated function we loop the actors to check for their bool:
The branch will stop the loop on a false and the execute the open/close door custom event passing the last value of the loop. - Finally the open / close door as you have it but now with the input variable to know if it should open or close:
Here are some references that will help you study some concepts used here:
- How To Use Blueprint Communications in Unreal Engine | Unreal Engine 5.1 Documentation
- https://www.youtube.com/watch?v=sEcoWGrF1Hg
Hope it helps.