How do I create a Boolean list / index / array to track the recent player character that enters my Trigger Box on ComponentBeginOverlap?

Actually, the interface isn’t a good solution in this case, since they’re all characters; you’re just patching it up. Simply create a base character that all characters inherit. This way, you’ll easily know which one is the last one, since you can save it in a single variable, since they all inherit from a default. You can also do for loops since you can save them all in an array.

If later, in a more advanced phase, you don’t want this trigger to have references to the characters, you could use interfaces. But the way you talk to the other actor doesn’t answer the question.

1 Like