# CreateDummySprite

## Description

Creates a sprite in the given sprite ID, it returns the sprite ID used. Dummy sprites behave as normal sprites but have no image or other visual aspect to them. They will not be drawn even if an image is assigned to them. They are useful for adding physics objects to a scene without needing visuals to accompany the physics shape. You can use the physics contact and feedback commands to work out what has hit these hidden physics shapes if desired. If you do not need to know what has hit your hidden shapes then you can add them all to a single dummy sprite using the AddSpriteShape commands for best performance.
SetSpriteShape will not work on dummy sprites as they have no image to calculate a shape, shapes must be defined manually using SetSpriteShapeBox, SetSpriteShapeCircle, or SetSpriteShapePolygon.
Dummy sprites will not update their stored angle and position with the latest physics versions, so calls to GetSpriteX, GetSpriteY, or GetSpriteAngle will return the last value you set. Setting the sprite's position will update the physics body to the position you set.

## Definition

CreateDummySprite( iSpriteIndex )

void agk::CreateDummySprite( UINT iSpriteIndex )

integer CreateDummySprite( )

UINT agk::CreateDummySprite( )

## Parameters

- iSpriteIndex - The ID to use for this sprite.