Sprite2 : Set 'OBJ' to Sprite 0 .Count
Sprite2 : Value 'OBJ' Greater or equal 800
Sprite: Pick one at random
Sprite2 : Subtract 1 from 'OBJ'
Sprite : Destroy[/code:2nxww7id]
So it removes one "Sprite" at each tick until the number reached 800. But in order to remove all of them at once, I've added a "While" condition so they could be destroyed more quickly. This is what this cap does : http://www.zoglu.net/trucs/bugwhile.rar
However, when I run it in the end there are about 860 sprites, while the "Sprite2"'s variable 'OBJ' has reached 800. Like if sometimes the variable was decremented but no "Sprite" was destroyed.
Also, if I try to replace the "Sprite2 : Subtract 1 from 'OBJ'" by a "Sprite2 : Set 'OBJ' to Sprite.Count", it goes into an infinite loop. That's weird, because one "Sprite" is supposed to be destroyed at each loop, so the object count should decrease.
So... I know I'm not following the best way to do it, but it definitely looks like a bug. Or maybe I'm just doing it wrong from the beginning. What do you think about this?