Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_homealone_dancing_santa_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (is_active)
3
{
4
    timer++;
5
    loop_timer++;
6
    if (timer == 1)
7
    {
8
        audio_file = (santa_type == 0) ? 140 : 11;
9
        play_time = (santa_type == 0) ? 40 : 60;
10
        sprite_index = spr_noellehouse_dancing_santa_pressed;
11
        image_speed = 0.25;
12
        image_speed = (santa_type == 0) ? 0.25 : 0.15;
13
        if (santa_type == 2)
14
        {
15
            image_speed = 0.4;
16
            santa_pitch = 2.5;
17
            play_time = 30;
18
        }
19
        snd_play(audio_file, 0.5, santa_pitch);
20
    }
21
    if (timer == play_time)
22
    {
23
        timer = 0;
24
        image_speed = 0;
25
        image_index = 0;
26
        if (global.interact == 0 && loop_timer >= 90)
27
        {
28
            is_looping = false;
29
            loop_timer = 0;
30
        }
31
        if (is_looping)
32
        {
33
            timer = 0;
34
        }
35
        else
36
        {
37
            sprite_index = spr_noellehouse_dancing_santa;
38
alarm[10]
39
            is_active = false;
40
        }
41
    }
42
    if (global.interact == 3)
43
    {
44
        is_active = false;
45
        snd_stop(audio_file);
46
    }
47
}