notalentgeek Posted August 19, 2015 Share Posted August 19, 2015 I have this game I made. A character have a gun and it can shoot bullets, the bullets will gone after reach a distance of 100 pixels.The bullets are in bullet group, of which I set to have only 50 bullets. And I used destroy(true); to every bullet that has passed 100 pixels. However when the bullet is destroyed it does not count to group's countDead(). Hence, countDead() is always 0 even though bullets have go though 100 pixels and got destroyed. So my question is how can you destroy a group member and make it count to as in countDead()? Link to comment Share on other sites More sharing options...
rich Posted August 19, 2015 Share Posted August 19, 2015 Destroy literally destroys the instance of the Sprite, removing it from the Group in the process. If you want to re-use it again then you should kill() it and reset() it, rather than destroy it. notalentgeek 1 Link to comment Share on other sites More sharing options...
notalentgeek Posted August 20, 2015 Author Share Posted August 20, 2015 Thanks rich! Link to comment Share on other sites More sharing options...
Recommended Posts