Event fires while in a trigger volume

Hi,
I’ve got an event that fires only when 2 conditions occur : the player looks at an object, and the trigger attached to this object is triggered.
It works fine each time the player enters the trigger WHILE looking at the object. However if the player looks around while triggering, and THEN looks at the object, nothing appears.
I’d to make the trigger work as a switch, and not as a ponctual event.

Here is the trigger activation bp :

The “Object Hitten” Component refers to the name of the object seen by the camera (through a LineTrace function).

Any idea about changes to make to my bp ?

From what you said, you ned to trigger it almost once, and as long as the player around and moving the came, don’t keep triggering it every time the line hit the object.

In that note:

  1. Make a bigger trigger around the object and call it Area trigger or so
  2. Make a bool, that is “false” by default.
  3. Once the player enter the big trigger nothing happens
  4. If the player eye line hit the object while being in the Area trigger & the bool is False, then set the bool to “True” and do whatever sequence you want
  5. Now the player will never activate that thing again
  6. Once the player exit the Area trigger, set the bool to “False” again

-m

So in that case you just need to make a bool, and set it true once the player enter the trigger.

As long as the bool is true, use it as the 2nd condition if your logic. I mean your logic will be controlled by:

  • Looking at the object
  • the bool is true

And once the player get out of the trigger, set it back to false

:slight_smile:

-m

Hi, thanks for the answer.
It’s not exactly what I meant :
I’ve got a box that grows up as the player approach AND look at it. If the player stays in the near from the box (in the trigger volume), and looks somewhere else, the box shrinks off. If the player (always in the trigger) looks again at the box, it’ll grow up again.
Also in my example, if the player enters the trigger volume without looking at the objects and look at it once the tigger is activated, the box won’t grow up… And I want it to grow ! :slight_smile:

I’ll try with your idea though, but I think it’s not what I need…

Ok thank’s, let’s try this :slight_smile:

Hmm…
I probably miss something. It doen’t work much better, here is my bp :

Well… I finally just reduce the lentgh of the line traced to hit the object.
I’ll make without the trigger. Thanks, though !

Hi Teapot Creation.
Are you still having this issue? I am having a similar issue.

The blueprint you have will only fire the MOMENT you are ENTERING the trigger. Not WHILE you are IN the trigger.
As mamoniem is saying. You can make yourself a “isInVolume”-bool that is true when entering and false when exiting.
And Then you can use an EVENT TICK to fire a branch that checks whether isInVolume is true and subsequently fire off your timeline.

The way you currently have it, the script will only trigger the frame you enter the volume and then stop.

If anyone else sees this post, question,
Is there a way to make yourself an event for WHILE you are in a volume, not relying on EVENT TICK?

Hi, sorry for the delay.
I’ve changed the system for a line tracing, as I couldn’t find a solution.

Your solution with a bool looks great though, I’ll try it next time I face the problem. Thanks !