Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_fcastle_cafe_Other_15

related scripts: Create_0Draw_0Other_11Other_12Other_13Other_15 Step_0Step_1Step_2

(view raw script w/o annotations or w/e)
1
var hideGreen = false;
2
with (tableright)
3
{
4
    if (sprite_index == spr_enemy_green_walk)
5
        hideGreen = true;
6
}
7
with (tableleft)
8
{
9
    if (sprite_index == spr_enemy_green_walk)
10
        hideGreen = true;
11
}
12
if (instance_exists(obj_cutscene_master))
13
    hideGreen = true;
14
with (npcGreen)
15
{
16
    with (marker)
17
        image_alpha = lerp(image_alpha, !hideGreen * 1.2, 1/3);
18
    if (myinteract == 3 && canwave)
19
    {
20
        canwave = false;
21
        myinteract = 4;
22
        
23
        var endseq = function()
24
        {
25
            with (marker)
26
            {
27
                sprite_index = spr_enemy_green_walk;
28
                image_index = 0;
29
                image_speed = 0;
30
            }
31
            canwave = true;
32
            myinteract = 0;
33
        };
34
        
35
        with (marker)
36
        {
37
            sprite_index = spr_enemy_green_wave;
38
            
39
            var wl = function()
40
            {
41
                snd_play(snd_xylophone_blink, undefined, 1.375);
42
                image_index = 1;
43
            };
44
            
45
            var wr = function()
46
            {
47
                snd_play(snd_xylophone_blink, undefined, 1);
48
                image_index = 0;
49
            };
50
            
51
            wl();
52
            delay_function(wr, 8);
53
            delay_function(wl, 16);
54
            delay_function(wr, 24);
55
            with (other)
56
                delay_function(endseq, 32);
57
        }
58
    }
59
}