OK Mal, I'm convinced that they may not COLLIDE, but they WOULD greatly affect each other. That in itself could be a fun scenario.
Laryssa, even if the Milky Way and Andromeda galaxies were to pass through each other right now, the chances of 2 stars coming close enough to each other to affect their solar systems are still almost nill. There is a LOT of empty space in a galaxy...
Now, early during formation, within a star cluster, or a globular cluster or the central hub of a galaxy, things are different, but you are not going to have habitable planets, or many planets at all, in those regions. So star collisions, or even near misses CAN happen, but EXTREMELY rarely and even then, probably no planets involved.
Globular clusters and galactic hubs have stars that have such a low metalicity that they probably don't have planets and star forming regions are so young, the planets probably haven't formed yet. Exceptions exist, but not many.