• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

mask_index and image_x/yscale


I am trying to set the mask_index of my player to another sprite, and that works, but I need to also make it larger.

How do I do that?

mask_index = screwFlame.sprite_index;
my screwFlame has image_xscale and image_yscale applied so it gets larger with upgrades. But the collision mask doesn't appear to grow with it.


That's because xscale / yscale are instance-specific settings just like the others. The fact that several instances may share the same sprite or mask does not make them automatically share some other select values as well. The code has to set all values you want to be altered.


Is this code inside screwFlame? If so, remove this entire code, as it is pointless.

If the sprite has different bounding boxes for each frame, only frame 0 gets used for the mask_index, I think. Again, if this is inside screwFlame, there is no point to setting the mask_index anyway.

When everything is done right, the mask_index will scale up with image_xscale and image_yscale.

Also make sure you are actually using image_xscale and image_yscale, rather than custom variables and a draw_sprite_ext() call.