Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_homealone_present_Draw_0

(view raw script w/o annotations or w/e)
1
if (shake)
2
{
3
    shake_timer++;
4
    if (shake_timer == 1)
5
    {
6
        snd_loop(snd_paper_surf);
7
        shake_x_offset -= 0.3;
8
        shake_y_offset += 0.3;
9
    }
10
    if (shake_timer == 2)
11
    {
12
        snd_stop(snd_paper_surf);
13
        shake_x_offset += 0.3;
14
        shake_y_offset -= 0.3;
15
        shake = false;
16
        shake_timer = 0;
17
    }
18
}
19
draw_sprite(sprite_index, 0, x + shake_x_offset, y + shake_y_offset);