Delete All Function by Pyramid Games Ltd8th Oct 2007 21:46
|
---|
Summary This function deletes everything that you have loaded into DBP. Recoded by JosephB. Description Quoted from my forum post, Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com `///Recoded By JosephB function DeleteAll() sync rate 0 `speed up process delete objects 1,lastobjectnumber `This is the last object number for i = 1 to 0xffff if i < 256 if memblock exist(i) = 1 then delete memblock i if matrix exist(i) = 1 then delete matrix i if terrain exist(i) = 1 then delete terrain i if effect exist(i) = 1 then delete effect i if i < 33 if file open(i) =1 then close file i if animation exist(i) =1 then delete animation i if i < 8 if light exist(i) = 1 then delete light i endif endif endif if image exist(i) = 1 then delete image i if sprite exist(i) = 1 then delete sprite i if sound exist(i) = 1 then delete sound i if music exist(i) = 1 then delete music i if mesh exist(i) = 1 then delete mesh i next i endfunction |