# SetSpriteCollideBit

## Description

Sets or removes a category that this sprite can collide with. Sprites are assigned categories using SetSpriteCategoryBit. There are 16 categories, a value of 1 for that category represents that this sprite will collide with sprites from that category and 0 that it will not collide with that category, regardless of which category this sprite itself belongs to. By default all sprites belong to category 1 and collide with all categories. This command is similar to SetSpriteCategoryBits except this command sets one category at a time whilst that command sets them all at once using a bit mask.

## Definition

SetSpriteCollideBit( iSpriteIndex, category, flag )

void agk::SetSpriteCollideBit( UINT iSpriteIndex, UINT category, int flag )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.
- category - The category to set collision on or off for this sprite, must be between 1 and 16 inclusive.
- flag - 1 to set collision on, 0 to turn it off for this sprite.