Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_ghosthouse_trigger_Collision_obj_heart

(view raw script w/o annotations or w/e)
1
if (active)
2
{
3
    if (tutu)
4
    {
5
        if (tutu == 1)
6
        {
7
            with (obj_your_tutu)
8
alarm[0]
9
            visible = false;
10
            tutu = 9;
11
        }
12
        else if (tutu == 3)
13
        {
14
            if (room == room_bullettest || room == room_bullettest_new)
15
            {
16
                var mus = mus_play(snd_init("pumpkin_boss.ogg"));
17
                audio_sound_set_track_position(mus, 21);
18
            }
19
            with (obj_battlesolid)
20
            {
21
                if (mask_index == spr_no_mask && sprite_index != spr_ghost_house_yourtutu_inner)
22
                    image_blend = merge_color(c_red, c_black, 0.6);
23
                else
24
                    image_blend = c_red;
25
            }
26
            with (obj_gh_bouncebarrier)
27
                image_blend = merge_color(c_red, c_black, 0.6);
28
            with (obj_ghosthouse_trigger)
29
                active = false;
30
            with (obj_ghosthouse_jackolantern)
31
            {
32
                sprite_index = spr_guywhoappearswhenyouhavetakentoolonginaghosthouse;
33
                fully_aggro = true;
34
                active = true;
35
                damage = 100;
36
                if (x < -75)
37
                    x = -75;
38
                speed_scale = true;
39
                snd_resume(global.batmusic[0]);
40
            }
41
        }
42
    }
43
    else
44
    {
45
        active = false;
46
        with (obj_ghosthouse_jackolantern)
47
        {
48
            pause = true;
49
            store_speed = path_speed;
50
            path_speed = 0;
51
        }
52
        var _depth = obj_heart.depth + 1 + alternate;
53
        pumpkin = instance_create_depth(obj_dbulletcontroller.pumpkin_x, obj_dbulletcontroller.pumpkin_y, _depth, obj_ghosthouse_jackolantern);
54
        if (instance_exists(obj_your_tutu))
55
        {
56
            with (obj_battlesolid)
57
            {
58
                if (image_xscale == -2)
59
                    instance_destroy();
60
            }
61
        }
62
        if (alternate == 1)
63
        {
64
            with (pumpkin)
65
            {
66
                polite = true;
67
                active = false;
68
                sprite_index = spr_jackolantern_but_politer;
69
                linked_block = instance_create_depth(x, y, -100, obj_battlesolid);
70
                linked_block.sprite_index = spr_jackolantern_but_politer;
71
                linked_block.image_xscale = 0.9;
72
                linked_block.image_yscale = 0.9;
73
                linked_block.visible = false;
74
            }
75
        }
76
        else if (alternate == 2)
77
        {
78
            with (pumpkin)
79
            {
80
                small = true;
81
                sprite_index = spr_small_jackolantern;
82
                with (obj_gh_fireball_bouncy)
83
                {
84
                    if (doomed)
85
                        instance_destroy();
86
                }
87
            }
88
        }
89
        if (alternate == 2)
90
        {
91
            with (obj_darkness_overlay)
92
                draw_all_solids = true;
93
            with (obj_battlesolid)
94
            {
95
                if (image_yscale == -3)
96
                {
97
                    mask_index = spr_nothing;
98
                    
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_angle", image_angle, image_angle - 90, 72, -2, "inout");
99
                }
100
            }
101
        }
102
        instance_destroy();
103
        if (chimney)
104
        {
105
            pumpkin.timer = -55 + (15 * (i_ex(obj_jackenstein_enemy) && obj_jackenstein_enemy.scaredycat));
106
            pumpkin.x += 45;
107
            pumpkin.move_directly = true;
108
            pumpkin.mask_index = spr_jackolantern_but_politer;
109
            with (pumpkin)
110
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, x - 120, 25, -1, "out");
111
            with (obj_gh_exitsign)
112
            {
113
                instance_destroy();
114
                gravity = 0.1;
115
            }
116
        }
117
        with (obj_battlesolid)
118
        {
119
            if (mask_index == spr_no_mask && sprite_index != spr_ghost_house_yourtutu_inner)
120
                image_blend = merge_color(c_yellow, c_black, 0.6);
121
            else
122
                image_blend = c_yellow;
123
        }
124
        with (obj_gh_bouncebarrier)
125
            image_blend = merge_color(c_yellow, c_black, 0.6);
126
    }
127
}