I have the GM5 examples... but the mario kart one and the GM5 functions are outdated...
Track2 = sprite_duplicate(Track_Dirt);
sprite_shift(Track2,160-Mario.x,160-Mario.y);
sprite_resize(Track2,120,120,5);
sprite_rotate(Track2,90-Mario.direction,1);
for (i=1;i<=60;i+=1) {
a = 0.7854 + 0.62025*i/60;
//a = 0.7854 + i/60;
z = 10 * tan(a);
d = floor(10 / cos(a));
draw_sprite_part_ext(Track2,0,
60-d,75-z, //left,top
2*d,1, //width,height
0,120-i, //x,y
160/(2*d),1, //xscale,yscale
1); //alpha
}
sprite_delete(Track2);