sprite_get_bbox_mode

This function will return the current "mode" for the bounding box calculations. You supply the sprite index of the sprite to check, and the function will return one of the constants shown below.

 

Syntax:

sprite_get_bbox_mode(ind);

ArgumentTypeDescription
indSprite AssetThe index of the sprite to check.

 

Returns

Bounding Box Mode Constant

ConstantDescription
bboxmode_automaticAutomatic - The bounding box will be calculated automatically, based on the tolerance setting for the sprite
bboxmode_fullimageFull Image - The bounding box will be set to use the full width and height of the sprite, regardless of the tolerance and "empty" pixels
bboxmode_manualManual - The bounding box has been set manually to user defined values (either in the sprite editor, or using the function sprite_set_bbox())

 

Example:

if (sprite_get_bbox_mode(sprite_index) != 0)
{
    sprite_set_bbox_mode(sprite_index, bboxmode_automatic);
}

The above checks the bbox mode for the current sprite and if it's not automatic, then it is sets it to that value.