Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkshape_mine_Draw_0

(view raw script w/o annotations or w/e)
1
if (!surface_exists(my_surface))
2
    my_surface = surface_create(88, 88);
3
var color = make_color_rgb(255, (1 - light) * 255, (1 - light) * 255);
4
surface_set_target(my_surface);
5
draw_clear_alpha(c_black, 0);
6
draw_sprite_ext(sprite_index, image + ((timer % 4) * 0.5), 44, 44, xscale * xface * scalefactor, yscale * yface * scalefactor, image_angle, color, image_alpha);
7
surface_reset_target();
8
var xoff = 0;
9
var yoff = 0;
10
if (shakeme)
11
{
12
    xoff = choose(-1, 0, 1);
13
    yoff = choose(-1, 0, 1);
14
}
15
for (a = 0; a < 88; a++)
16
{
17
    var side = 1;
18
    draw_surface_part(my_surface, 0, a, 88, 1, (x - 46) + (sin((a + timer) * 1) * (3 - (image_alpha * 3)) * side) + xoff, (y - 44) + a + yoff);
19
}