How do I get this to only trigger once, while keeping it overlapped?

How do I get the event to trigger only once, while keeping the boxes overlapped?

To be clear, the boxes are not triggering each other, they just play the event twice when the player walks into the combined zones.

1 Like

A quick idea to test:

  • Add the boxes to a custom collision channel.
  • Add a collision component to your pawn that only detects that specific collision channel.
    • OnComponentBeginOverlap (PawnSensor)
      • if OtherActor is BoxClass:
        • Count = GetOverlappingActors(BoxClass).Length
        • if Count == 1 && !bDidSomething → do, set bDidSomething = true
    • OnComponentEndOverlap (PawnSensor)
      • if OtherActor is BoxClass:
        • Count = GetOverlappingActors(BoxClass).Length
        • if Count == 0bDidSomething = false
1 Like

Yep, that was it! Thank you so much for the help!