init = 1; if (animdone) { timer++; if (timer >= endtime) instance_destroy(); }