DeleteSprite
DeleteSprite SpriteIndex
 
Parameters:

    SpriteIndex = The identifier of the sprite you wish to delete
Returns: NONE
 

     DeleteSprite will remove a selected sprite from the 'active' sprite list. This will stop the sprite from being drawn, and clear all of it's properities and release them from memory.




FACTS:


      * When a sprite is deleted, only the sprite data is removed from memory. The associated sprite image ( Attached via SpriteImage) are not deleted.

      * See DeleteAllSprites to remove all sprites from memory.

      * See DeleteSpriteRange to remove batches of sprites






Mini Tutorial:


      Creating a sprite, display its status, and then deleting it.

  
  
; Create Sprite #1
  CreateSprite 1
  
; Display the status of sprite #1  (0 = deleted, 1 = created)
  Print GetSpriteStatus(1)
  
; Delete the Sprite from memory
  DeleteSprite 1
  
; Display the status of sprite #1  (0 = deleted, 1 = created)
  Print GetSpriteStatus(1)
  
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output.

  
  1
  0
  

 
Related Info: CreateSprite | DeleteAllSprites | GetFreeSprite | GetSpriteStatus :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com