Doors open after shooting the target.

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:
DoorMultiLocks


The trigger actor
  • Only component with collision is the Box, it’s set to Block All.
    image
  • 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:
    image
    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:

Hope it helps.

2 Likes