Tuesday, September 29, 2026

Blocks and Pips, bug fix

 There was a strange situation if you had a tile on top of a converter block (above the glass), then another tile below the glass would get stuck.

So instead of instance_place, I wrote a function instance_place_depth

function instance_place_depth(xx,yy,obj,inst_depth)
{
var output=noone;
var instance_list=ds_list_create();
var count=instance_place_list(x,y,obj,instance_list,true);
if(count>0)
for(var i=0;i<count;i++)
if(instance_list[| i].depth==inst_depth)
{
output=instance_list[|i];
break;
}
ds_list_destroy(instance_list);
return output;
}

Which only looks for instances at a particular coordinates and depth.  Testing looks good.

No comments:

Post a Comment

Freezing Tiles

 I noticed that students were spam-answering puzzles, and so I put in a freeze effect when the answer is wrong.  The tile will thaw out, but...