Draws the collision masks for a given frame of a skeletal animation with transforms.


GML Code Example

draw_skeleton_collision(sprite, animname, frame, x, y, xscale, yscale, rot, colour)

Argument Description
sprite The index of the sprite to draw.
animname The name of the animation to get the frame from (a string).
frame The animation frame to draw (from 0 to image_number - 1).
x The x coordinate of where to draw the sprite.
y The y coordinate of where to draw the sprite.
xscale The horizontal scaling of the sprite, as a multiplier: 1 = normal scaling, 0.5 is half etc...
yscale The vertical scaling of the sprite, as a multiplier: 1 = normal scaling, 0.5 is half etc...
rot The rotation of the sprite. 0=normal, 90=turned 90 degrees counter-clockwise etc.
colour The colour with which to blend the sprite.

Returns: N/A


This function will draw the collision masks associated with the given skeletal animation. You supply the base sprite, the animation set to use and the frame to get the information from, and you can also set the transform properties to suit.

IMPORTANT: Spine integration in GameMaker: Studio is a Pro licence feature and will not work in the Free/Standard versions.


GML Code Example

draw_skeleton_collision(sprite_index, "jump", image_index, x, y, image_xscale, image_yscale, image_angle, c_white);

The above code will draw the collision mask data for the current sprite, using the current transforms, for the animation set "jump".

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here