• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker separate rectangular collision masks per sub image?

S

Shadowblitz16

Guest
will this ever be possible to do in the sprite editor?

I really want to use objects as tiles since tiles are hardcoded at compile time however I need to use separate rectangular collision masks per sub image.

this is because some of the subimages are not completely 16x16 rectangles and I want proper collisions with them.

if not whats the best way around it?
I guess I could use a array of rects but then I can't see mask when I am trying to tune it.
 

TheouAegis

Member
Who knows. But you could always j7st maake your own collision code and use an array to hold the bounding box sizes.
 
S

Shadowblitz16

Guest
ya but again its nice to see what the rects are.
and the sprite editor is a nice tool
 
J

JFitch

Guest
Have a different sprite for each one. Give them similar names that differ only by a number (for example: sprite_name0, sprite_name1, sprite_name2). Create a variable for that number that functions like image_index, and use asset_get_index("sprite_name"+variable) to set the sprite.
 
Top