Undertale script viewer

← back to main script listing

gml_Object_obj_1sidegen_Alarm_0

(view raw script w/o annotations or w/e)
1
script_execute(SCR_BORDER, 0, 6);
2
x = xx;
3
y = yy;
4
if (bullettype == 0)
5
    script_execute(SCR_DIRECT, 2.5, 0.2, 0, 0, 0, 0, 0, 0, 0, 174);
6
if (bullettype == 1)
7
{
8
    iii = instance_create(x, y, blt_flybullet);
9
    if (instance_exists(iii))
10
        iii.dmg = global.monsteratk[myself];
11
}
12
if (bullettype == 2)
13
{
14
    iii = instance_create(x, y, blt_splinterbig);
15
    if (instance_exists(iii))
16
        iii.dmg = global.monsteratk[myself];
17
}
18
if (bullettype == 3)
19
{
20
    iii = instance_create(x, y, blt_pollendrop);
21
    if (instance_exists(iii))
22
        iii.dmg = global.monsteratk[myself];
23
}
24
if (bullettype == 4)
25
{
26
    iii = instance_create(global.idealborder[0], global.idealborder[2] + round(random(global.idealborder[3] - global.idealborder[2] - 60)) + 30, blt_roachbullet);
27
    if (instance_exists(iii))
28
        iii.dmg = global.monsteratk[myself];
29
    iii = instance_create(global.idealborder[1] - 4, global.idealborder[2] + round(random(global.idealborder[3] - global.idealborder[2] - 60)) + 30, blt_roachbullet);
30
    if (instance_exists(iii))
31
        iii.dmg = global.monsteratk[myself];
32
}
33
if (bullettype == 5)
34
{
35
    num += 1;
36
    script_execute(SCR_BORDER, 0, 40);
37
    x -= 20;
38
    y += 5;
39
    iii = instance_create(x, y, blt_vegbullet);
40
    sum = scr_monstersum
scr_monstersum

return global.monster[0] + global.monster[1] + global.monster[2];
();
41
    if (instance_exists(iii))
42
    {
43
        if (num == (4 - sum) && specgreen == 1)
44
        {
45
            iii.green = 1;
46
            iii.image_blend = c_lime;
47
        }
48
        iii.dmg = global.monsteratk[myself];
49
    }
50
}
51
if (bullettype == 6)
52
{
53
    num += 1;
54
    script_execute(SCR_BORDER, 0, 40);
55
    x -= 20;
56
    y += 5;
57
    iii = instance_create(x, y, blt_gravbullet);
58
    if (instance_exists(iii))
59
    {
60
        if (instance_exists(obj_parsnik) == 0)
61
        {
62
            if (num == 4 && specgreen == 1)
63
            {
64
                iii.green = 1;
65
                iii.image_blend = c_lime;
66
            }
67
        }
68
        else if (num == 8 && specgreen == 1)
69
        {
70
            iii.green = 1;
71
            iii.image_blend = c_lime;
72
        }
73
        iii.dmg = global.monsteratk[myself];
74
    }
75
}
76
if (bullettype == 7)
77
{
78
    x = (global.idealborder[0] + ((global.idealborder[1] - global.idealborder[0]) / 2)) - 3;
79
    y = global.idealborder[2] - 25;
80
    iii = instance_create(x, y, blt_firehelix1);
81
    if (instance_exists(iii))
82
    {
83
        iii.dmg = global.monsteratk[myself];
84
        if (global.hp < 8)
85
            iii.dmg = 2;
86
        if (global.hp < 6)
87
            iii.dmg = 1;
88
    }
89
    if (global.hp <= 2)
90
        global.turntimer = -100;
91
}
92
if (bullettype == 8)
93
{
94
    x = (global.idealborder[0] + ((global.idealborder[1] - global.idealborder[0]) / 2)) - 3;
95
    y = global.idealborder[2] + 5;
96
    iii = instance_create(x, y, blt_minihelix);
97
    if (instance_exists(iii))
98
    {
99
        iii.dmg = global.monsteratk[myself];
100
        if (global.hp < 8)
101
            iii.dmg = 2;
102
        if (global.hp < 6)
103
            iii.dmg = 1;
104
    }
105
    if (global.hp <= 2)
106
        global.turntimer = -100;
107
}
108
if (bullettype == 9)
109
{
110
    script_execute(SCR_BORDER, 0, 80);
111
    x -= 40;
112
    y -= 20;
113
    iii = instance_create(x, y, blt_avoidfire);
114
    if (instance_exists(iii))
115
        iii.dmg = 1;
116
}
117
if (bullettype == 10)
118
{
119
    x = (global.idealborder[0] + ((global.idealborder[1] - global.idealborder[0]) / 2)) - 3;
120
    y = global.idealborder[2] - 25;
121
    iii = instance_create(x, y, blt_firehelix1);
122
    if (instance_exists(iii))
123
    {
124
        iii.dmg = global.monsteratk[myself];
125
        if (global.hp < 8)
126
            iii.dmg = 2;
127
        if (global.hp < 6)
128
            iii.dmg = 1;
129
    }
130
    if (global.hp <= 2)
131
        global.turntimer = -100;
132
    x = global.idealborder[0] + 2;
133
    y = global.idealborder[2] + 90;
134
    iiii = instance_create(x, y, blt_floatfire);
135
    if (instance_exists(iiii))
136
    {
137
        iiii.dmg = global.monsteratk[myself];
138
        if (global.hp < 8)
139
            iiii.dmg = 2;
140
        if (global.hp < 6)
141
            iiii.dmg = 1;
142
    }
143
    x = global.idealborder[1] - 18;
144
    iiiii = instance_create(x, y, blt_floatfire);
145
    if (instance_exists(iiiii))
146
    {
147
        iiiii.dmg = global.monsteratk[myself];
148
        if (global.hp < 8)
149
            iiiii.dmg = 2;
150
        if (global.hp < 6)
151
            iiiii.dmg = 1;
152
    }
153
}
154
if (bullettype == 11)
155
{
156
    script_execute(SCR_BORDER_X, 1, 30, 30);
157
    gen = instance_create(x, y, blt_hat);
158
    if (instance_exists(gen))
159
        gen.dmg = global.monsteratk[myself];
160
}
161
alarm[0] = firingspeed;
gml_Object_obj_1sidegen_Alarm_0.gml

script_execute(SCR_BORDER, 0, 6); x = xx; y = yy; if (bullettype == 0) script_execute(SCR_DIRECT, 2.5, 0.2, 0, 0, 0, 0, 0, 0, 0, 174); if (bullettype == 1) { iii = instance_create(x, y, blt_flybullet); if (instance_exists(iii)) iii.dmg = global.monsteratk[myself]; } if (bullettype == 2) { iii = instance_create(x, y, blt_splinterbig); if (instance_exists(iii)) iii.dmg = global.monsteratk[myself]; } if (bullettype == 3) { iii = instance_create(x, y, blt_pollendrop); if (instance_exists(iii)) iii.dmg = global.monsteratk[myself]; } if (bullettype == 4) { iii = instance_create(global.idealborder[0], global.idealborder[2] + round(random(global.idealborder[3] - global.idealborder[2] - 60)) + 30, blt_roachbullet); if (instance_exists(iii)) iii.dmg = global.monsteratk[myself]; iii = instance_create(global.idealborder[1] - 4, global.idealborder[2] + round(random(global.idealborder[3] - global.idealborder[2] - 60)) + 30, blt_roachbullet); if (instance_exists(iii)) iii.dmg = global.monsteratk[myself]; } if (bullettype == 5) { num += 1; script_execute(SCR_BORDER, 0, 40); x -= 20; y += 5; iii = instance_create(x, y, blt_vegbullet); sum = scr_monstersum(); if (instance_exists(iii)) { if (num == (4 - sum) && specgreen == 1) { iii.green = 1; iii.image_blend = c_lime; } iii.dmg = global.monsteratk[myself]; } } if (bullettype == 6) { num += 1; script_execute(SCR_BORDER, 0, 40); x -= 20; y += 5; iii = instance_create(x, y, blt_gravbullet); if (instance_exists(iii)) { if (instance_exists(obj_parsnik) == 0) { if (num == 4 && specgreen == 1) { iii.green = 1; iii.image_blend = c_lime; } } else if (num == 8 && specgreen == 1) { iii.green = 1; iii.image_blend = c_lime; } iii.dmg = global.monsteratk[myself]; } } if (bullettype == 7) { x = (global.idealborder[0] + ((global.idealborder[1] - global.idealborder[0]) / 2)) - 3; y = global.idealborder[2] - 25; iii = instance_create(x, y, blt_firehelix1); if (instance_exists(iii)) { iii.dmg = global.monsteratk[myself]; if (global.hp < 8) iii.dmg = 2; if (global.hp < 6) iii.dmg = 1; } if (global.hp <= 2) global.turntimer = -100; } if (bullettype == 8) { x = (global.idealborder[0] + ((global.idealborder[1] - global.idealborder[0]) / 2)) - 3; y = global.idealborder[2] + 5; iii = instance_create(x, y, blt_minihelix); if (instance_exists(iii)) { iii.dmg = global.monsteratk[myself]; if (global.hp < 8) iii.dmg = 2; ...