I'm making a 2d game and once the player dies, I wish to delete all of the sprites so that I don't get an error that says sprite already exists. Here is the code that I use to do it:
for t=3 to limit
if sprite exist(t)=1 then delete sprite t
next t
for q=11 to limit2
if sprite exist(q)=1 then delete sprite q
next q
However, this does not work. I know there isn't a delete all sprites command(which would be very useful in a future update of dbc or dbpro) so how can I accomplish this. Or is my code just plain wrong?
Bio Fox...four guys, one computer, games like nobody's business.