zwzsg wrote:You know the speed the meteor goes at, you know the initial altitude, so the time it hits ground is only a division away. Perform a Spring.DestroyUnit(unitID,true,false) at this time. Or if you are afraid that the ground might get deformed by something else while meteor is travelling, just compare unit y position with ground height at every frame.
Actually, I was even more worried about the meteor silently passing through steep mountains on its way to its final location, but ground deformation is a big enough issue already.
Checking the units y position against the ground height seems logical but I was afraid that doing the check each frame might get a bit costly. As I don't know anything about how the gadget will influence performance and can't think of a better way, I will do the check though.
zwzsg wrote:Otherwise free falling units most often automatically die from the shock of hitting the ground. But I don't think freefall would work well for meteor showers, since it'd go faster and faster.
Spring.MoveCtrl.SetGravity should solve that problem, I guess. Can't test, as the meteor won't even care about hitting the ground. ;)
I tried
Spring.MoveCtrl.SetCollideStop, but that seems to do something different. At least it does not change the meteors transcendent nature...
Thank you for the help. Substituting my comets with peewees makes the script work already (and a lot of fun to watch :D). I'm guessing that
Spring.DestroyUnit will not work without a COB-file for my comet. Guess I'll have to find out what exactly that is and how I can make one. After that I'll just have to figure out how to work with Explosions, create a wreckage and the whole thing will be done.