Undertale script viewer

← back to main script listing

gml_Object_obj_floweyx_mouth_Draw_0

(view raw script w/o annotations or w/e)
1
onoff += 1;
2
if (onoff > 3)
3
    onoff = 0;
4
draw_set_color(c_black);
5
if (instance_exists(obj_mouthbeam) == 0)
6
{
7
    if (mode == 0)
8
        ossafe_fill_rectangle(x, y + 8, x + 60, y + 110);
9
    if (mode == 1)
10
        ossafe_fill_rectangle(x - 10, y + 8, x + 70, y + 110);
11
    if (mode == 2)
12
        ossafe_fill_rectangle(x - 18, y + 8, x + 78, y + 110);
13
}
14
if (con == 3)
15
{
16
    con = 4;
17
    cntr = 0;
18
    alarm[4] = 40;
19
}
20
if (con == 4)
21
{
22
    cntr += 1;
23
    draw_sprite_ext(spr_mouthflash, 0, 274, 202 - (sin(siner / 4) * 3), 1, 1, 0, c_white, (cntr - (onoff * 5)) / 15);
24
}
25
if (con == 5)
26
{
27
    laugh = 1;
28
    mode = 2;
29
    b = instance_create(271, 214, obj_mouthbeam);
30
    b.depth = depth + 1;
31
    con = 6;
32
    alarm[4] = 25;
33
}
34
if (con == 7)
35
{
36
    laugh = 0;
37
    mode = 0;
38
    con = 0;
39
}
40
if (frozen == 0)
41
{
42
    siner += 1;
43
    if (desperate == 1)
44
        siner += 0.4;
45
    anim += 0.25;
46
}
47
op = 60;
48
draw_sprite_ext(spr_floweyx_mouthbridge, image_index, x + 10, y, 1, 1, 0, image_blend, image_alpha);
49
if (mode == 0)
50
{
51
    if (rotbonus > 0)
52
        rotbonus -= 5;
53
    else
54
        rotbonus = 0;
55
    if (xbonus > 0)
56
        xbonus -= 2;
57
    else
58
        xbonus = 0;
59
    if (ybonus < 0)
60
        ybonus += 2;
61
    else
62
        ybonus = 0;
63
    ybonus = 0;
64
}
65
if (mode == 1)
66
{
67
    if (ybonus > -4)
68
        ybonus -= 2;
69
    if (xbonus < 6)
70
        xbonus += 2;
71
    if (rotbonus < 15)
72
        rotbonus += 5;
73
}
74
if (mode == 2)
75
{
76
    if (ybonus > -8)
77
        ybonus -= 4;
78
    if (xbonus < 6)
79
        xbonus += 2;
80
    if (rotbonus < 24)
81
        rotbonus += 8;
82
}
83
if (desperate == 0)
84
{
85
    draw_sprite_ext(spr_floweyx_mouthedge, image_index, ((x + (sin(siner / 2) * 3)) - 20) + xbonus, ((y + cos(siner / 2)) - 5) + ybonus, 1, 1 + (sin(siner / 4) * 0.03), 0 - cos(siner / 2) - rotbonus, image_blend, 1);
86
    draw_sprite_ext(spr_floweyx_mouthl, image_index, x + (sin(siner / 2) * 3) + xbonus, y + cos(siner / 2) + ybonus, 1, 1 + (sin(siner / 4) * 0.03), 0 - cos(siner / 2) - rotbonus, image_blend, 1);
87
    draw_sprite_ext(spr_floweyx_mouthedge, image_index, ((x - (sin(siner / 2) * 3)) + op + 20) - xbonus, ((y + cos(siner / 2)) - 5) + ybonus, -1, 1 + (sin(siner / 4) * 0.03), 0 + cos(siner / 2) + rotbonus, image_blend, 1);
88
    draw_sprite_ext(spr_floweyx_mouthl, image_index, (x + op) - (sin(siner / 2) * 3) - xbonus, y + cos(siner / 2) + ybonus, -1, 1 + (sin(siner / 4) * 0.03), 0 + cos(siner / 2) + rotbonus, image_blend, 1);
89
}
90
if (desperate == 1)
91
{
92
    draw_sprite_ext(spr_floweyx_mouthedge, image_index, ((x + (sin(siner / 2) * 4)) - 20) + xbonus, ((y + cos(siner / 2)) - 5) + ybonus, 1, 1 + (sin(siner / 4) * 0.06), 0 - cos(siner / 2) - rotbonus, image_blend, 1);
93
    draw_sprite_ext(spr_floweyx_mouthl, image_index, x + (sin(siner / 2) * 4) + xbonus, y + cos(siner / 2) + ybonus, 1, 1 + (sin(siner / 4) * 0.05), 0 - cos(siner / 2) - rotbonus, image_blend, 1);
94
    draw_sprite_ext(spr_floweyx_mouthedge, image_index, ((x - (sin(siner / 2) * 4)) + op + 20) - xbonus, ((y + cos(siner / 2)) - 5) + ybonus, -1, 1 + (sin(siner / 4) * 0.06), 0 + cos(siner / 2) + rotbonus, image_blend, 1);
95
    draw_sprite_ext(spr_floweyx_mouthl, image_index, (x + op) - (sin(siner / 2) * 4) - xbonus, y + cos(siner / 2) + ybonus, -1, 1 + (sin(siner / 4) * 0.05), 0 + cos(siner / 2) + rotbonus, image_blend, 1);
96
}
97
draw_sprite_ext(spr_floweyx_dimple, anim, ((x + (sin(siner / 2) * 3)) - 5) + xbonus, y - 10, 1, 1 + (sin(siner / 4) * 0.03), 0 + cos(siner / 2), image_blend, 1);
98
draw_sprite_ext(spr_floweyx_dimple, anim, (((x + op) - (sin(siner / 2) * 3)) + 5) - xbonus, y - 10, -1, 1 + (sin(siner / 4) * 0.03), 0 + cos(siner / 2), image_blend, 1);
99
if (global.debug == 1)
100
{
101
    if (control_check_pressed(1))
102
    {
103
        if (mode == 0)
104
            mode = 1;
105
        else
106
            mode = 0;
107
    }
108
}
109
if (global.debug == 1)
110
{
111
    if (control_check_pressed(2))
112
    {
113
        if (laugh == 0)
114
            laugh = 1;
115
        else
116
            laugh = 0;
117
    }
118
}
119
if (laugh == 1)
120
{
121
    siner = 0;
122
    laughtimer += 1;
123
    if (laughtimer == 1)
124
    {
125
        rotbonus = -3;
126
        xbonus = -1;
127
        ybonus = 0;
128
    }
129
    if (laughtimer == 2)
130
    {
131
        rotbonus = 6;
132
        xbonus = 2;
133
        ybonus = -1;
134
    }
135
    if (laughtimer == 3)
136
    {
137
        rotbonus = 18;
138
        xbonus = 4;
139
        ybonus = -3;
140
    }
141
    if (laughtimer == 4)
142
    {
143
        rotbonus = 20;
144
        xbonus = 6;
145
        ybonus = -4;
146
    }
147
    if (laughtimer == 5)
148
    {
149
        rotbonus = 12;
150
        xbonus = 4;
151
        ybonus = -3;
152
    }
153
    if (laughtimer == 6)
154
    {
155
        rotbonus = 6;
156
        xbonus = 2;
157
        ybonus = -2;
158
    }
159
    if (laughtimer == 7)
160
    {
161
        rotbonus = 0;
162
        xbonus = 0;
163
        ybonus = 0;
164
    }
165
    if (laughtimer == 6)
166
        laughtimer = 1;
167
}