Updates collision mask properties of the sprite asset loaded from the /sprites folder.
Argument | Type | Description |
---|---|---|
sprite | :string | The name of the sprite to set the bounding box of |
sepmasks | :real | Whether to create collision masks for each sub-image of the sprite (true) or one mask for all (false) |
bboxmode | :real | The kind of bounding box: 0 = automatic 1 = full image 2 = user defined |
bbleft | :real | The maximum left position of the bounding box |
bbtop | :real | The maximum top position of the bounding box |
bbright | :real | The maximum right position of the bounding box |
bbbottom | :real | The maximum bottom position of the bounding box |
kind | :real | The kind of mask: 0 = precise 1 = bounding box 2 = disk 3 = diamond |
Example, called from init.gml:
// changing offset of the jump sprite to [94, 138]:
sprite_change_offset( "jump", 94, 138 );
// making it precise:
sprite_change_collision_mask( "jump", true, 0, 0, 0, 0, 0, 0 );