HideSprite

Last Modified: 1/4/2021

Sets the coordinates for Sprite to (0,0).

Arguments

NameTypeRequiredDescription
Sprite Integer Yes Sprite is the variable you prepared with AddSprite().

Example

Syntax: HideSprite <Sprite>
    sprite = AddSprite(1,1)
    PropSprite sprite,1,0
    
    MoveSprite sprite,200,200
    Print "Press A to hide, B to show"
    
    While 1
        j = JoyPad(0)
    
        If j.6 Then
            HideSprite sprite
        End If
    
        If j.4 Then
            MoveSprite sprite,200,200
        End If
    
        Locate 1,1
        Print SpritePosX(sprite); " ", SpritePosY(sprite); " "
    
        Sleep 1
    Wend

Remarks

If you just want to change the sprite coordinates without moving it off screen, you can use the MoveSprite or ShiftSprite commands.

See Also

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