Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_mansion_Other_11

(view raw script w/o annotations or w/e)
1
hp--;
2
if (hp < 45)
3
    image_index = 1;
4
if (hp < 24)
5
    image_index = 2;
6
flashtimer = 3;
7
hittimer = 9;
8
snd_stop(snd_damage);
9
snd_play(snd_damage);
10
shakeobj = instance_create(x, y, obj_shakeobj_susiezilla);
11
shakeobj.target = id;
12
shakeobj.shakeamt = 6;
13
shakeobj.shakereduct = 1;
14
with (shakeobj)
15
    event_user(0);
16
if (image_xscale > 0)
17
    piece = instance_create((x - 50) + random(75), (y - 100) + random(50), obj_susiezilla_building_piece);
18
else
19
    piece = instance_create(((x - 50) + random(75)) - 80, (y - 100) + random(50), obj_susiezilla_building_piece);
20
piece.vspeed = -8;
21
piece.hspeed = -2 + random(4);
22
piece.gravity_direction = 270;
23
piece.gravity = 0.5;
24
piece.depth = depth - 10;
25
if (hp < (hpmax * 0.9) && trasurecon == 0)
26
{
27
    trasurecon = 1;
28
    collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
29
    collectible.itemtype = 4;
30
    with (collectible)
31
        event_user(0);
32
    with (collectible)
33
        event_user(1);
34
}
35
if (hp < (hpmax * 0.8) && trasurecon == 1)
36
{
37
    trasurecon = 2;
38
    collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
39
    collectible.itemtype = 9;
40
    with (collectible)
41
        event_user(0);
42
    with (collectible)
43
        event_user(1);
44
}
45
if (hp < (hpmax * 0.7) && trasurecon == 2)
46
{
47
    repeat (5)
48
    {
49
        trasurecon = 3;
50
        collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
51
        collectible.itemtype = 1;
52
        with (collectible)
53
            event_user(0);
54
        with (collectible)
55
            event_user(1);
56
    }
57
}
58
if (hp < (hpmax * 0.6) && trasurecon == 3)
59
{
60
    repeat (3)
61
    {
62
        trasurecon = 4;
63
        collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
64
        collectible.itemtype = 1;
65
        with (collectible)
66
            event_user(0);
67
        with (collectible)
68
            event_user(1);
69
    }
70
}
71
if (hp < (hpmax * 0.5) && trasurecon == 4)
72
{
73
    trasurecon = 5;
74
    collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
75
    collectible.itemtype = 4;
76
    with (collectible)
77
        event_user(0);
78
    with (collectible)
79
        event_user(1);
80
}
81
if (hp < (hpmax * 0.4) && trasurecon == 5)
82
{
83
    repeat (3)
84
    {
85
        trasurecon = 6;
86
        collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
87
        collectible.itemtype = 1;
88
        with (collectible)
89
            event_user(0);
90
        with (collectible)
91
            event_user(1);
92
    }
93
}
94
if (hp < (hpmax * 0.3) && trasurecon == 6)
95
{
96
    repeat (7)
97
    {
98
        trasurecon = 7;
99
        collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
100
        collectible.itemtype = 1;
101
        with (collectible)
102
            event_user(0);
103
        with (collectible)
104
            event_user(1);
105
    }
106
}
107
if (hp < (hpmax * 0.2) && trasurecon == 7)
108
{
109
    repeat (10)
110
    {
111
        trasurecon = 8;
112
        collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
113
        collectible.itemtype = 1;
114
        with (collectible)
115
            event_user(0);
116
        with (collectible)
117
            event_user(1);
118
    }
119
}
120
if (hp < (hpmax * 0.1) && trasurecon == 8)
121
{
122
    repeat (10)
123
    {
124
        trasurecon = 9;
125
        collectible = instance_create(x, y - 40, obj_susiezilla_collectible);
126
        collectible.itemtype = 1;
127
        with (collectible)
128
            event_user(0);
129
        with (collectible)
130
            event_user(1);
131
    }
132
}