The function varies with some species using them to attract mates, while others use them to lure prey.