Is it possible to activate a box trigger only if im facing a certain direction

What Im trying to do is having the character (which is you) walk down the stairs and enter to a room, but on your way back you will activate the trigger box. But my problem is when I go down the stairs I activate the trigger box which I only want to activate it on my way back. Is there a way I can activate the trigger box only on my way back?

I’m not sure exactly how to do this, but I saw in another person’s tutorial they used something called “Get Actor Forward Vector”, which let you do some branching depending on the position of the camera view and the other actor:

Or, you could put two trigger boxes in front of the door. Trigger A and trigger B. Trigger A will open the door, and then once you have done whatever you need to do in the room, have a different trigger (Trigger C) inside the room, activate Trigger B. Now that Trigger B is on, you will cross it when you leave the room and the door will shut.

Put a trigger box in the room that enables the one outside of the room.

Make two actual boxes, and make them invisible. Make a blueprint for each of them.

Here is a picture of the blueprint for the box inside of the room, followed by the one for outside of the room.

Make the “Other Trigger Activated” variable (or whatever you wanna call it) inside of the blueprint for the trigger that is outside of the room.

You’re checking to see if the overlapping actor is the player, then casting to the blueprint outside of the room, letting it know that the player has overlapped it by setting its variable to true.

For the blueprint outside of the room, it checks if the overlapping actor is the player, and if the other trigger has been activated.

Thanks for the answers and suggestions, I actually really like the idea of putting a tigger box inside to enable the one I want. Is there a tutorial on that or how can I make that possible. Sorry I’m still learning how to use blueprint

check out my updated answer

ok I think I understand it very well actually!! :slight_smile: So basically the top picture is basically the box trigger inside the room and on my way back I will go into the other box trigger which will was activated (bottom picture) But what if i use a box trigger will it still be the same? Or by boxes you meant trigger boxes? lol sorry just to clarify

Np! Here’s some more detailed instructions on setting up the boxes themselves, with pictures included.

So first, create a fresh blueprint in your content browser by right clicking. Make it an Actor blueprint. For the sake of these instructions being cohesive, start with your outside trigger, and name the blueprint something like Trigger_Outside.

Go to the Components tab, and click Add Component. Scroll down and select Box under Shapes. Go into the Box details by clicking on it under Components.

Make sure Generate Overlap Events is on.

Go over to the Graph tab and setup the blueprints like I showed you in my original answer, using the second picture from that original answer, for the outside trigger. Make sure you create the “Other Trigger Activated” variable, from my original answer.

Now duplicate the blueprint, and rename the duplicate to something like Trigger_Inside.

Go into the Graph tab in the new blueprint and set it up using the first picture from my original answer, for the inside trigger.

Now place those suckers in your level! You can always turn off Hidden In Game in their Components details to see your trigger boxes in the level and make sure they’re covering the areas you want. When they’re setup in the game properly, turn Hidden In Game back on to make them invisible.

Let me know if you need more! Always happy to help, so don’t be afraid to ask.

If not, go ahead and mark my answer as resolved please.

20318-screenshot+(17).png

20319-screenshot+(18).png

Hey I’m sorry to bother you but it did not work :confused: its not working for me for some reason. this is what I have.

The top one is the trigger outside which is the one I want to use when I go back and the bottom picture is the trigger box inside which I want to use to activate the other trigger box so when i head back outside it will work. But it seems like its not working, like its not syncing for some reason, any suggestions?
Like actually when I get inside the event actor begin overlay box(BoxTriggerInside) it doesn’t cast to triggerboxOutside.

I’m not sure if by trigger box you meant Trigger Volume, if so cool, otherwise, I would suggest using Trigger Volumes, found under the Volumes tab. Place two like Devious mentioned, but all you need is to have them selected and create On Begin Overlap Event in your Level Blueprint. Get one for each and also get a reference to each.

Here is where to find the Trigger Volume and how to set them up in the Level Blueprint to achieve what you are asking for.

It’s all very simple, as long as you remember to have your Trigger Volumes selected when you create the On Begin Overlap Events in your Level Blueprint :wink:

Much better, thanks for improving that! This will help me as well.

Lego4, you can use this, and if you want to filter the trigger to only react to the player, use the same class filter I mentioned earlier.

Check out Mortusnyte’s answer. It’s a more efficient version of what I have been telling you.

hmm ok just so I can understand, The reason why it works is because you start the level with the trigger volume2 without collision, so when you cross it, it wont work because it doesn’t detect you since there’s no collision? but when you cross the triggervolume1 it enables triggervolume2 to have collision so when you go back you can activate what you want? I am correct??? :smiley: or no… lol

100% correct! :slight_smile:

This post as been unresolved for a while. Accept the answer that worked best for you to resolve this post :slight_smile: