# CreateSprite

## Description

Creates a sprite in a blank sprite ID with an image to use when rendering, it returns the sprite ID used.
By default sprites are created with a depth of 10, are sized using the given image as a guide, and positioned at 0,0 using their top left corner.
You may use an image ID of 0 to create a blank sprite drawn with color only. If the assigned image has alpha pixels the sprite is create with a transparency mode of 1, otherwise it uses a transparency mode of 0 (opaque)

## Definition

integer CreateSprite( iImageIndex )

UINT agk::CreateSprite( UINT iImageIndex )

CreateSprite( iSpriteIndex, iImageIndex )

void agk::CreateSprite( UINT iSpriteIndex, UINT iImageIndex )

## Parameters

- iImageIndex - The ID of the image to use when drawing this sprite
- iSpriteIndex - The sprite ID to use to reference this sprite later (separate from image IDs, so there can be both a sprite 1 and an image 1)