FreeAllSprites

Last Modified: 1/4/2021

Resets the sprite data for Sprite.

Arguments

NameTypeRequiredDescription
Sprite Integer Yes The variable that contains the sprite data from the AddSprite() function.

Example

Syntax: FreeSprite <Sprite>
    Dim sprites(5) As Integer
    
    For i = 0 To 5
        sprites(i) = AddSprite(1,1)
        PropSprite sprites(i),1,0
        MoveSprite sprites(i),136+(i>>4),136
    Next
    
    Locate 4,0: Print "Press Start to clear some sprites"
    
    Do
        j = JoyPad()
        If j.7 Then
            FreeSprite sprites(3)
            FreeSprite sprites(5)
            Exit Do
        End If
        Sleep 1
    Loop
    
    End

Remarks

If you want to reset all of the sprite data, the FreeAllSprites command will clear and reset all sprite data.

See Also

FreeAllSprites, HideSprite, LinkSprite, MoveSprite, PropSprite, ResizeSprite, ShiftSprite, AddSprite(), SpritePosX(), SpritePosY()