How to check if a sprite overlaps a sprite of kind enemy inside a function?

I am trying to check if my sprite overlaps a sprite of kind chessPieceWhite or chessPieceBlack inside a function, is this possible?

1 Like

I would use an if statement like this:
image
There is probably a smaller way but this is what I usually do.

1 Like