External Exam Download Resources Web Applications Games Recycle Bin

headbutt coinblocks | gml

objCoinBlock Step

if (self.bbox_bottom+1 == objMario.bbox_top) and
   (self.bbox_left < objMario.x) and
   (self.bbox_right > objMario.x) {
        instance_destroy();
        //sound, anim, spawn powerup or score etc
 }