Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

removeSprite()

Purpose

Remove a sprite that is no longer needed

Description

Free up the memory allocated to a sprite so that it can be reused

Syntax

removeSprite( sprite )

Arguments

handle The handle of the created sprite

Example

image = loadImage( "Untied Games/Enemy small top C", false )
ship = createSprite()
setSpriteImage( ship, image )
lastpos = { gWidth() / 2, gHeight() / 2 }
setSpriteLocation( ship, lastpos )
setSpriteScale( ship, { 4, 4 } )
drawSprites() 
update()
sleep( 3 )
clear()
removeSprite( ship )
drawSprites() // nothing is drawn
update()
sleep( 3 )

Associated Commands

createSprite(), deltaTime(), drawSprites(), updateSprites(), updateSprite()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.