How to replace On Component Begin Overlap Event with an Interface

236 Views Asked by At

So im new to Blueprint Interfaces and I want to replace the On Component Begin Overlap Event with an Interface I made but its not working. "EnemyNPC" is a reference to the Player Character in the interface

The code after the branch is a timer that damages an actor every second when the player overlaps with the actors box collision.

I created the Interface and added a function called "OnCollision" with an input that references the Player Character and tried to replace the On Component Begin Overlap event with it but nothing happened. enter image description here

1

There are 1 best solutions below

0
GChapX On

You can't just "replace" an event with an other from an Interface, the On Component Begin Overlap will be there nevertheless. What you could do however is to define in your interface your "OnCollision" as a function instead of an event, and on your actor when the On Component Begin Overlap event is fired call this function from your interface.