Posted: 6th Oct 2011 14:32
Basically I need to know how to delete all sprites( cloned or not cloned) that are currently in use.

More Detail.

I have 500 sprites or so currently in game. The problem I am having is that sometimes when I try to go and clear the room the current room I am in then then load new graphics on the screen. The problem I am having is that some of the sprites are not replaced and the room looks funny, but when I build the project again the rooms look fine.

Here is a example using XCode.

Clone sprite some sprites like walls and traps keep track of them.
then put sprite at a certain depth.
if user steps through area transition then erase all sprites that are kept track of then erase clone more sprites.
Posted: 6th Oct 2011 15:14
Hi 3dPoint...
I don't know if you have tried this: you can keep each sprite number in an array in memory and, when you want initialize the room, just run from first element to last one doing an deletesprite from each element of the array.
Hope this help

Regards
Posted: 6th Oct 2011 15:28
All system created sprites starts from 10001 upwards, so making a for next loop checking if they exist, then delete them should not be to hard.
Posted: 6th Oct 2011 18:19
Hu if the go 10001 upwards all i have to do is mark the first sprite, and last that was created from the previous room. then delete all sprites from first to last.