Colonial Cells Demonstrating Cell Specialization
Probably not what you are looking for but the protozoan slime mold Dictyostelium discoideum lives as free amoebae which can coalesce into a multicellular migratory slug that eventually forms a fruiting body in which some cells form the stalk while others form spores.

Slug formation is by chemotactic signalling with cyclic AMP as the signal. I seem to remember that there is a predatory species of slime mold which uses cAMP to attract D. discoideum as prey, but I can't bring the name to mind and have failed to find it online.