Perhaps it was an error on my side; then I need your help with the code.
I've added this line in the beginning of draw event in every wall or block:
triangles_break_batch((image_xscale + image_yscale + image_xscale*image_yscale)*2)
And this line in the beginning of draw event in every floor and ramp:
triangles_break_batch(image_xscale*image_yscale*2)
Then, I've created a script (still uisng gms 1.4) named "triangles_break_batch" containing this code:
global.triangles_so_far += 2*argument0 if(global.triangles_so_far >= 1000) { global.triangles_so_far -= 1000 d3d_transform_set_identity(); }
Finally, I've added this to the create event of CONTROL object:
global.triangles_so_far = 0