ShiftSprite

Last Modified: 1/4/2021

Shifts a Sprite by X, Y pixels.

Arguments

NameTypeRequiredDescription
Sprite Integer Yes Sprite is the variable you prepared with AddSprite().
X Integer Yes The x-coordinate you want to shift the Sprite by.
Y Integer Yes The y-coordinate you want to shift the Sprite by.

Example

Syntax: ShiftSprite <Sprite>, <X>, <Y>
    Dim a As Integer
    a = AddSprite(1,1)
    PropSprite a,1,0
    
    MoveSprite a,128,128     Sleep 30
    ShiftSprite a,32,64

Remarks

The coordinates for the visible display for a Sprite begins at 128,128. Unlike MoveSprite, ShiftSprite moves the Sprite relative to its current position.

See Also

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