draw_rotated

Draws a sprite as if it were rotated by "angle" degrees, without any actual 3D functions. Call this in the Draw event. Use depth_adj to change how the rotation affects the edges of the shape that go into and out of the screen, a value of 0.5 looks decent.

 Script

///draw_rotated(angle,depth_adj)
//Draws a sprite as if it were rotated along the Y axis, into and out of the screen.
//angle = The angle of rotation in degrees
//depth_adj = a constant to control the perspective of the object, or "edge stretching". 0 = no stretching, 1 = double stretching. 0.5 looks nice.
//The X origin of the sprite can be anywhere.
//Set the Y origin of the sprite to the center for best effect, but placing the origin elsewhere has a cool effect too.
var curx,cury,curheight;
for (i=0;i<sprite_width;i++) {
    curx = x-(i-sprite_xoffset)*cos(degtorad(argument0));
    curheight = 1 + argument1*(((i-sprite_xoffset)/sprite_width) * sin(degtorad(argument0)));
    cury = y - sprite_yoffset*curheight
    draw_sprite_part_ext(sprite_index,image_index,i,0,1,sprite_height,curx,cury,1,curheight,image_blend,image_alpha);
}