Hi guys,
I’ve build a scene where I want one trigger box to open several sliding doors. My basic visual script is like Zacks in a tutorial, but when I copy several OnActorBeginOverlap I get an error of course. I read in some thread to use Component, but I can’t find what they used. I can just have more trigger boxes at the same spot but I want the more elegant solution. What’s the obvious answer I’m missing?
Maybe you get the error because you have to use the predefined trigger event inside your Trigger Volume component? If you want to code it use a set boolean on event. Then add a different event, maybe “on tick”, on each door component.
You can keep going with how you have the top 1. Just duplicate your “set actor location” and add it for the other 3 doors and with your + node on there just do for each door.
The blueprint example project has something similar where if any of the cameras spot you the alarm sounds and closes the door. It uses a blueprint interface to connect all the cameras
Can anyone explain what do they mean in docs for OnActorBeginOverlap with this sentence: Each event can only execute a single object. If you want to trigger multiple actions from one event, you will need to string them together linearly.
It means that you have to string them together like you have so that it runs through linearly, so you cant just run off to multiple different locations.
Simplest way for you to achieve the reverse is to duplicate everything you have there and connect the OnActorEndOverlap to reverse. It’s an incredibly messy an bad way to do it but it would achieve your desired result. Personally though I would change things around a bit and use array’s and loops. If you create an array of all your doors and do a forEach loop through them all, setting their location and having a delay before doing the next 1 like you currently have then you should be able to do it quite easily
I’m just a hobbyist, so take what I say with a grain of salt.
On my doors I took the “finished” plug on the timeline and ran it through a delay node, then to “reverse from end” on the timeline. I also use the trigger box to make sure the player is not under the door when it closes.