DarkBASIC Professional Help File

DX11 GET SPRITE FRAME

Returns the current frame number displayed by a the given sprite.
This will update as a sprite animation is playing, allowing you to poll this function to determine when a certain frame has been reached and take some action based on that.
If called for a non-animated sprite (or rather one which haven't been split into frames using DX11 SET SPRITE SHEET SPLIT), this function will always return 0.

Syntax

    Return Dword = DX11 GET SPRITE FRAME(sprite)

Parameters

    sprite

> Dword
> The sprite to get the current frame of.

Returns

The frame number currently used to determine what area of the source image to display on the given sprite.

See also

SPRITE Functions Menu
DX11 Function Categories