supercomputer276
Member
I'm attempting to test a gameplay concept of erasing parts of a solid object to provide a path through. While I have managed to use surfaces to erase parts of the sprite's physical appearance, attempting to use sprite_collision_mask on the sprite created from the surface results in the same collision mask as before and the player object being unable to move through them. Since the function's manual page states it only works on duplicated sprites, I tried duplicating the object's base sprite, adding the new frame from the surface, and setting the image_index to it, with no change.
Does anyone know how to set the collision mask for the new sprite so that the player can move through the erased part?
The test so far:
https://mega.nz/#!mwgWgTKC!RHuCfG5EoSxRjpbif33I4-dfvPSplmRqnAZ6gO0u-h4
Arrows to move (tank controls), click and drag left mouse to erase, click button to reset
Does anyone know how to set the collision mask for the new sprite so that the player can move through the erased part?
The test so far:
https://mega.nz/#!mwgWgTKC!RHuCfG5EoSxRjpbif33I4-dfvPSplmRqnAZ6gO0u-h4
Arrows to move (tank controls), click and drag left mouse to erase, click button to reset