Undertale script viewer

← back to main script listing

gml_Object_obj_wrapshock_Draw_0

(view raw script w/o annotations or w/e)
1
if (oo == 0)
2
    oo = 1;
3
else
4
    oo = 0;
5
if (freeze == 0)
6
    siner += 1;
7
s_timer += 1;
8
if (s_timer > 60)
9
    shock = 0;
10
ss = sin(siner / 6) * 90 * mf;
11
ii = -sin(siner / 6) * mf;
12
if (mf < 1 && y < 0)
13
    y += 1;
14
if (type == 0)
15
{
16
    if (mf < 1 && y < -30)
17
        y += 1;
18
    x += (cos(siner / 2) * 0.5 * mf);
19
    y += (sin(siner / 12) * 0.8 * mf);
20
    if (ss < 0)
21
        image_blend = make_color_rgb(255, 255 + ss, 255 + ss);
22
    if (oo == 1)
23
        draw_sprite_ext(spr_toriel_wrapshock, 0, x, y, 2, 2, 0, c_white, ii);
24
    draw_sprite_ext(spr_toriel_wrap, 0, x, y, 2, 2, 0, image_blend, image_alpha);
25
    if (shock == 1)
26
    {
27
        draw_sprite_ext(spr_face_torieldie, 0, x + 58, y - 52, 2, 2, 0, image_blend, image_alpha);
28
    }
29
    else
30
    {
31
        if (face == 0)
32
            draw_sprite_ext(spr_face_torielpain, 0, x + 58, y - 52, 2, 2, 0, image_blend, image_alpha);
33
        if (face == 1)
34
            draw_sprite_ext(spr_face_torielencourage, 0, x + 58, y - 52, 2, 2, 0, image_blend, image_alpha);
35
        if (face == 2)
36
            draw_sprite_ext(spr_face_torielencourage, 1, x + 58, y - 52, 2, 2, 0, image_blend, image_alpha);
37
    }
38
}
39
if (type == 1)
40
{
41
    x += (cos(siner / 2) * 0.5 * mf);
42
    y += (sin(siner / 12) * 0.8 * mf);
43
    if (ss < 0)
44
        image_blend = make_color_rgb(255, 255 + ss, 255 + ss);
45
    if (oo == 1)
46
        draw_sprite_ext(spr_pap_wrapshock, 0, x - 12, y, 2, 2, 0, c_white, ii);
47
    draw_sprite_ext(spr_papwrap, 0, x, y, 2, 2, 0, image_blend, image_alpha);
48
    if (shock == 1)
49
    {
50
        draw_sprite_ext(spr_papface_fatal, 0, x + 40, y, 2, 2, 0, image_blend, image_alpha);
51
    }
52
    else
53
    {
54
        if (face == 0)
55
            draw_sprite_ext(spr_papface_wrap, 0, x + 40, y, 2, 2, 0, image_blend, image_alpha);
56
        if (face == 1)
57
            draw_sprite_ext(spr_paphead_believe, 0, x + 40, y, 2, 2, 0, image_blend, image_alpha);
58
        if (face == 2)
59
            draw_sprite_ext(spr_asgore_shockface, 0, x + 40, y, 2, 2, 0, image_blend, image_alpha);
60
    }
61
}
62
if (type == 2)
63
{
64
    x += (cos(siner / 2) * 0.5 * mf);
65
    y += (sin(siner / 12) * 0.8 * mf);
66
    if (ss < 0)
67
        image_blend = make_color_rgb(255, 255 + ss, 255 + ss);
68
    if (oo == 1)
69
        draw_sprite_ext(spr_sanswrapshock, 0, x, y, 2, 2, 0, c_white, ii);
70
    draw_sprite_ext(spr_sanswrap, 0, x, y, 2, 2, 0, image_blend, image_alpha);
71
    if (shock == 1)
72
    {
73
        draw_sprite_ext(spr_sanswrapface, 0, x + 60, y - 44, 2, 2, 0, image_blend, image_alpha);
74
    }
75
    else
76
    {
77
        if (face == 0)
78
            draw_sprite_ext(spr_sanswrapface, 0, x + 60, y - 44, 2, 2, 0, image_blend, image_alpha);
79
        if (face == 1)
80
            draw_sprite_ext(spr_sanswrapface, 1, x + 60, y - 44, 2, 2, 0, image_blend, image_alpha);
81
        if (face == 2)
82
            draw_sprite_ext(spr_asgore_shockface, 0, x + 40, y, 2, 2, 0, image_blend, image_alpha);
83
    }
84
}
85
if (type == 3)
86
{
87
    x += (cos(siner / 2) * 0.5 * mf);
88
    y += (sin(siner / 12) * 0.8 * mf);
89
    goof = sin(siner / 5) * 10;
90
    if (ss < 0)
91
        image_blend = make_color_rgb(255, 255 + ss, 255 + ss);
92
    draw_sprite_ext(spr_undyneb_hair, siner / 5, x - 30, (y - 40) + (goof / 3), 2, 2, 0, image_blend, 1);
93
    if (oo == 1)
94
        draw_sprite_ext(spr_undynewrapshock, 0, x, y, 2, 2, 0, c_white, ii);
95
    draw_sprite_ext(spr_undynewrap, floor(siner / 5), x, y, 2, 2, 0, image_blend, image_alpha);
96
    if (shock == 1)
97
    {
98
        draw_sprite_ext(spr_undyneface_fatal, 0, x + 30, y - 40, 2, 2, 0, image_blend, image_alpha);
99
    }
100
    else
101
    {
102
        if (face == 0)
103
            draw_sprite_ext(spr_undyneface_wrap, floor(siner / 5), x + 30, y - 40, 2, 2, 0, image_blend, image_alpha);
104
        if (face == 1)
105
            draw_sprite_ext(spr_undyneface_encourage, 0, x + 30, y - 40, 2, 2, 0, image_blend, image_alpha);
106
        if (face == 2)
107
            draw_sprite_ext(spr_asgore_shockface, 0, x + 40, y, 2, 2, 0, image_blend, image_alpha);
108
    }
109
}
110
if (type == 4)
111
{
112
    x += (cos(siner / 2) * 0.5 * mf);
113
    y += (sin(siner / 12) * 0.8 * mf);
114
    if (ss < 0)
115
        image_blend = make_color_rgb(255, 255 + ss, 255 + ss);
116
    if (oo == 1)
117
        draw_sprite_ext(spr_alphyswrapshock, 0, x, y, 2, 2, 0, c_white, ii);
118
    draw_sprite_ext(spr_alphyswrap, 0, x, y, 2, 2, 0, image_blend, image_alpha);
119
    if (shock == 1)
120
    {
121
        draw_sprite_ext(spr_alphysface_hit, 0, x, y, 2, 2, 0, image_blend, image_alpha);
122
    }
123
    else
124
    {
125
        if (face == 0)
126
            draw_sprite_ext(spr_alphysface_wrap, 0, x, y, 2, 2, 0, image_blend, image_alpha);
127
        if (face == 1)
128
            draw_sprite_ext(spr_alphysface_wrap, 1, x, y, 2, 2, 0, image_blend, image_alpha);
129
        if (face == 2)
130
            draw_sprite_ext(spr_alphysface_wrap, 2, x, y, 2, 2, 0, image_blend, image_alpha);
131
    }
132
}
133
if (type == 5)
134
{
135
    x += (cos(siner / 2) * 0.5 * mf);
136
    y += (sin(siner / 12) * 0.8 * mf);
137
    if (ss < 0)
138
        image_blend = make_color_rgb(255, 255 + ss, 255 + ss);
139
    if (oo == 1)
140
        draw_sprite_ext(spr_asgore_wrapshock, 0, x, y, 2, 2, 0, c_white, ii);
141
    draw_sprite_ext(spr_asgore_wrap, 0, x, y, 2, 2, 0, image_blend, image_alpha);
142
    if (shock == 1)
143
    {
144
        draw_sprite_ext(spr_asgore_shockface, 0, x + 122, y - 32, 2, 2, 0, image_blend, image_alpha);
145
    }
146
    else
147
    {
148
        if (face == 0)
149
            draw_sprite_ext(spr_asgore_wrapface, 0, x + 124, y - 32, 2, 2, 0, image_blend, image_alpha);
150
        if (face == 1)
151
            draw_sprite_ext(spr_asgore_wrapface, 1, x + 124, y - 32, 2, 2, 0, image_blend, image_alpha);
152
        if (face == 2)
153
            draw_sprite_ext(spr_asgore_wrapface, 2, x + 124, y - 32, 2, 2, 0, image_blend, image_alpha);
154
    }
155
}
156
if (click == 1)
157
{
158
    draw_set_color(c_red);
159
    draw_text(400, 300, x);
160
    draw_text(400, 320, y);
161
    x = mouse_x - 50;
162
    y = mouse_y - 50;
163
}