because your unit is collapsED not collapsING. This function is used to detecting state where unit get stunned or killed and now falling down on ground.
Meridian said correct solution because this is definition when unit enter stunned state.
Overall, I check functions exposed to script and I see that I simply not added one used for killed units and stunned ones.
Probaby in some next version there will be new two functions `unit.isStunned temp;` and `unit.isKilled temp;`.