How to detect who triggered function that is part of an interface?

you could add an input parameter to Interact.Touched() that is an Object Reference to a Pawn called “Instigator”, and add a similar variable to the Box BP, so when you call the interface function, you can pass in a reference to the pawn that touched it last, and use that to update the Box’s reference, so you can call the pawn’s functions from within the Box.

if you want it to keep track of multiple pawns that might touch the same box, you may need to change it from a single reference variable into an array of object references of pawns, then add to or remove from that list whenever a pawn enters or leaves the Box.

1 Like