Wrong way trigger fire control?

I’ve got a trigger that fires off an event when the player goes down the wrong route in a maze, however when the player then turns round and goes the right way the event fires off again as the player goes over the same trigger.

How can I fix this so the player can only activate the trigger in a certain direction or at least only fire once and then wait a few seconds so that the player has time to cross over it?

Hi,

create a status variable which is set when the trigger hits “Overlap Begin” or “Overlap End”. Then you simply check on each call if this variable is set to true. If so ignore it. After you set the variable you start a delay or timer which triggers then your game over (or whatever action).

You also could simply disable collision response for that trigger.

Kind regards

freakxnet

Thanks for that freakX, but can you please show me how to configure that in my level BP that currently contains:
Trigger.jpg

I’ve tried adding a set collision enabled and that wont work unless it has a connection to target, I’ve tried connecting it to a “get player controller” node and it just doesn’t want to work!

‘Do once’ node is an option here. If the level reloads, then it’s auto ‘reset’.

For direction - you’d normally use vectors to work this out, although there are other ways (a couple of volumes next to each other and see which one gets hit first).

freakxnet is suggesting you use ‘branch’ and a boolean variable, which would also work fine.

I’m really struggling to get that working Freakx, I’ve tried to go down the collision setting route as it seemed a bit easier, but I cant get that to work either.

I’m also using the standard level BP that uses a trigger to fire a feedback event, it looks like this:
a92cbc9a3b58828879b3c5704aae7edb7cfd766c.jpeg

I’ve tried attaching an OnEndOverlap event:

now that disables the collision but its permanently not for the 2 seconds in the delay?

I’d really appreciate some help!

The point is here that you have to know when the player enters or leave the trigger.

Assume that you only want to have one large trigger which overs the whole “outside of the level” area.

Then you need to know when the player enters it and if the player have not leaved the trigger then game over.

In any case you need a status which tells you if the player has left that area.

So create a bool variable hasPlayerEntered

OnBeginOverlap => Set hasPlayerEntered=true => Delay 2 => Branch hasPlayerEntered=true => GameOver
OnEndOverlap => Set hasPlayerEntered=false

If the player enters the area you know this now. The delay runs and if the player leave the area during the delay the variable is set to false and nothing happens.

This is the most simple solution I can think of. If anyone has a simpler solution for that please I’m also interested in this.

freakxnet

Thanks for that freakX massively appreciate your kind help mate!