Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_homealone_dancing_santa_mini_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
        if (i_ex(obj_homealone_dess_closet_kris))
9
        {
10
            if (santa_type == 0)
11
            {
12
                with (obj_homealone_dess_closet_kris)
13
                    santaactive[0] = 1;
14
            }
15
            else
16
            {
17
                with (obj_homealone_dess_closet_kris)
18
                    santaactive[1] = 1;
19
            }
20
        }
21
        audio_file = (santa_type == 0) ? 140 : 11;
22
        play_time = (santa_type == 0) ? 40 : 60;
23
        image_speed = (santa_type == 0) ? 0.25 : 0.15;
24
        if (santa_type == 2)
25
        {
26
            image_speed *= 1.5;
27
            santa_pitch *= 1.5;
28
            play_time *= 1.5;
29
        }
30
        snd_play(audio_file, 1, santa_pitch);
31
    }
32
    if (timer == play_time)
33
    {
34
        timer = 0;
35
        image_speed = 0;
36
        image_index = 0;
37
        if (is_looping)
38
        {
39
            timer = 0;
40
        }
41
        else
42
        {
43
alarm[10]
44
            is_active = false;
45
        }
46
    }
47
}