totoe
(loopindex=8 ? 1 : loopindex+1) means "if loopindex=8 then 1, otherwise loopindex+1".
It's a shorter version of "If then else" event.
I'll explain again how I did this.
You need to define an image points for every node (red dot) of your sprite's collision polygon.
Image points should be located as close as possible to red dots, but a little bit outside of the collision polygon, just a couple of pixels.
See this picture, green dots are my image points:
Once a collision with the asteroid is detected, I take a small 4x4 pixels sprite called Detector©® and place it at image point 1.
Then I move it from image point 1 to 2, then from 2 to 3, and so on, and finally from 8 to 1.
While it's traveling, I constantly test if Detector it's overlapping the asteroid. If overlapping, I spawn particles at Detector location.
I should add that my example is not optimized. Detector sprite travels long distances 1 pixel at a time, performing overlapping check every step. And at every pixel where it overlaps with the asteroid, it spawns particles. As a result, there could be 100-200 particle objects spawned! All this may cause huge lags on a slow computer or mobile.
I don't think in a real game you need such precision, so you can move the Detector sprite 2, 4 or maybe even 10 pixels at once. This will significantly reduce the CPU load.