Take that While condition out? I've NEVER had a need for While in Construct, and it certainly doesn't need to be used there since on collision is only triggered when a collision happens so it's basically redundant. Besides, it would need to come before the condition being tested, not after.
As I see it, your condition is reading -
On collision AND While
While what? The While condition is causing it to loop infinitely causing the freezing of the game because it's stuck there.
While is useful for sorting like (excuse the simplicity but hopefully you get the idea)..
sorted = FALSE While NOT sorted ..Sort through hiscores ..If hiscores are in proper order then sorted = TRUE While Endprocrastinator2012-12-16 16:24:32
@OP. I think you may have take the reference of "while" a little too literal in reference to the English language. While while() does make some sense in what you want. It's not used correctly.
Use a while loop when you need compare condition. Also again procas is right. C2 has other caveats that allow development without a while loop. As a programmer I haven't used one yet in C2 though I have been tempted :D
so yes. "While your in collision do this" which is what you have. The while goes into a loop until false. As your object is now in a true condition. It then does your action and THEN it checks to see if the condition is true again. Which it is because your object is still in collision. Then it does the action, then checks the condition.. so on infinitum.