Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_thrash_transformation_controller_Draw_0

(view raw script w/o annotations or w/e)
1
d3d_set_fog(1, c_black, 0, 0);
2
draw_self();
3
d3d_set_fog(0, c_black, 0, 0);
4
draw_set_halign(fa_center);
5
if (instance_exists(obj_thrash_transformation_original) && obj_thrash_transformation_original.state == 1)
6
    timer++;
7
if (button1_p() && text_state == 1)
8
    text_state = 0;
9
if (text_state == 1)
10
    timer--;
11
if (timer >= (32 / f) && timer <= (38 / f))
12
{
13
    shouler_l.visible = 1;
14
    shouler_l.x -= 9;
15
    shouler_l.y -= 9;
16
    shouler_l.image_xscale += 0.2;
17
    shouler_l.image_yscale += 0.2;
18
    shouler_r.visible = 1;
19
    shouler_r.x += 9;
20
    shouler_r.y -= 9;
21
    shouler_r.image_xscale += 0.2;
22
    shouler_r.image_yscale += 0.2;
23
}
24
if (timer == (38 / f))
25
    timer = 60 / f;
26
if (timer >= (40 / f) && timer <= (50 / f))
27
{
28
}
29
if (timer == (60 / f))
30
{
31
    text_state = 1;
32
    draw_text_ext(x, y - 120, "Kris is the head", 20, 100);
33
}
34
if (timer >= (62 / f) && timer <= (82 / f))
35
{
36
    arm_l.image_xscale += 0.2;
37
    arm_l.image_yscale += 0.2;
38
    arm_l.visible = 1;
39
    arm_r.image_xscale += 0.2;
40
    arm_r.image_yscale += 0.2;
41
    arm_r.visible = 1;
42
}
43
if (timer == (84 / f))
44
{
45
    text_state = 1;
46
    draw_text_ext(x - 126, y - 25, "I'll be tha arms", 20, 100);
47
}
48
if (timer == (86 / f))
49
    timer = 92 / f;
50
if (timer >= (92 / f) && timer <= (98 / f))
51
{
52
    leg_l.image_xscale += 0.6;
53
    leg_l.image_yscale += 0.6;
54
    leg_l.visible = 1;
55
    leg_r.image_xscale += 0.6;
56
    leg_r.image_yscale += 0.6;
57
    leg_r.visible = 1;
58
}
59
if (timer == (100 / f))
60
{
61
    leg_l.basex = leg_l.x;
62
    leg_l.basey = leg_l.y;
63
    leg_r.basex = leg_r.x;
64
    leg_r.basey = leg_r.y;
65
}
66
if (timer >= (102 / f) && timer <= (140 / f))
67
{
68
    leg_l.x = (leg_l.basex - 2) + irandom(4);
69
    leg_l.y = (leg_l.basey - 2) + irandom(4);
70
    leg_r.x = (leg_r.basex - 2) + irandom(4);
71
    leg_r.y = (leg_r.basey - 2) + irandom(4);
72
}
73
if (timer >= (140 / f) && timer <= (150 / f))
74
{
75
    leg_l.image_xscale += 0.1;
76
    leg_l.image_yscale += 0.1;
77
    leg_r.image_xscale += 0.1;
78
    leg_r.image_yscale += 0.1;
79
}
80
if (timer == (162 / f))
81
{
82
    text_state = 1;
83
    draw_text_ext(x, y + 150, "I'll be the legs", 20, 100);
84
}
85
if (timer == (164 / f))
86
{
87
    flash = instance_create(x, y, o_afterimage);
88
    flash.sprite_index = sprite_index;
89
    flash.image_index = image_index;
90
    flash.image_xscale = image_xscale;
91
    flash.image_yscale = image_yscale;
92
    flash.image_blend = c_white;
93
    flash.image_speed = 0;
94
    flash.rate = 0.2;
95
    flash.hasboss = 0;
96
    flash.depth = depth - 1;
97
    flash.boss = id;
98
    flash.white_silhouette = 1;
99
    flash = instance_create(obj_thrash_transformation_original.x + 36, obj_thrash_transformation_original.heady, o_afterimage);
100
    flash.sprite_index = spr_thrash_head;
101
    flash.image_index = 0;
102
    flash.image_xscale = obj_thrash_transformation_original.head_xscale;
103
    flash.image_yscale = obj_thrash_transformation_original.head_yscale;
104
    flash.image_angle = obj_thrash_transformation_original.head_angle;
105
    flash.image_blend = c_white;
106
    flash.image_speed = 0;
107
    flash.rate = 0.2;
108
    flash.hasboss = 0;
109
    flash.depth = depth - 4;
110
    flash.white_silhouette = 1;
111
    with (obj_thrash_transformation_part)
112
    {
113
        flash = instance_create(x, y, o_afterimage);
114
        flash.sprite_index = sprite_index;
115
        flash.image_index = image_index;
116
        flash.image_xscale = image_xscale;
117
        flash.image_yscale = image_yscale;
118
        flash.image_blend = c_white;
119
        flash.image_speed = 0;
120
        flash.image_angle = image_angle;
121
        flash.rate = 0.2;
122
        flash.hasboss = 0;
123
        flash.depth = depth - 1;
124
        flash.boss = id;
125
        flash.white_silhouette = 1;
126
    }
127
    with (obj_thrash_transformation_original)
128
    {
129
        flash = instance_create(x, y, o_afterimage);
130
        flash.sprite_index = sprite_index;
131
        flash.image_index = image_index;
132
        flash.image_xscale = image_xscale;
133
        flash.image_yscale = image_yscale;
134
        flash.image_blend = c_white;
135
        flash.image_speed = 0;
136
        flash.rate = 0.2;
137
        flash.hasboss = 0;
138
        flash.depth = depth - 1;
139
        flash.boss = id;
140
        flash.white_silhouette = 1;
141
    }
142
}
143
if (timer >= (200 / f) && timer <= (210 / f))
144
{
145
    ratio = view_hport[0] / view_wport[0];
146
    view_wport[0] -= 24;
147
    view_hport[0] -= 24 * ratio;
148
    camera_set_view_size(view_camera[0], view_wport[0], view_hport[0]);
149
    __view_set(e__VW.XView, 0, __view_set(e__VW.XView, 0, __view_get(e__VW.XView, 0) + 12));
150
    __view_set(e__VW.YView, 0, __view_set(e__VW.YView, 0, __view_get(e__VW.YView, 0) + ((24 * ratio) / 2)));
151
}
152
if (timer > (250 / f))
153
{
154
    vspeed = -80 / f;
155
    state = 1;
156
    flash = instance_create(x, y, o_afterimage);
157
    flash.sprite_index = sprite_index;
158
    flash.image_index = image_index;
159
    flash.image_xscale = image_xscale;
160
    flash.image_yscale = image_yscale;
161
    flash.image_blend = c_white;
162
    flash.image_speed = 0;
163
    flash.rate = 0.1;
164
    flash.hasboss = 0;
165
    flash.depth = depth - 1;
166
    flash.boss = id;
167
    flash.black_silhouette = 1;
168
    with (obj_thrash_transformation_part)
169
    {
170
        vspeed = -80 / f;
171
        flash = instance_create(x, y, o_afterimage);
172
        flash.sprite_index = sprite_index;
173
        flash.image_index = image_index;
174
        flash.image_xscale = image_xscale;
175
        flash.image_yscale = image_yscale;
176
        flash.image_blend = c_white;
177
        flash.image_speed = 0;
178
        flash.rate = 0.1;
179
        flash.hasboss = 0;
180
        flash.depth = depth - 1;
181
        flash.boss = id;
182
        flash.black_silhouette = 1;
183
    }
184
    with (obj_thrash_transformation_original)
185
    {
186
        vspeed = -80 / f;
187
        flash = instance_create(x, y, o_afterimage);
188
        flash.sprite_index = sprite_index;
189
        flash.image_index = image_index;
190
        flash.image_xscale = image_xscale;
191
        flash.image_yscale = image_yscale;
192
        flash.image_blend = c_white;
193
        flash.image_speed = 0;
194
        flash.rate = 0.1;
195
        flash.hasboss = 0;
196
        flash.depth = depth - 1;
197
        flash.boss = id;
198
        flash.black_silhouette = 1;
199
    }
200
}
201
if (state == 1)
202
    black_alpha += 0.02;
203
draw_sprite_ext(spr_whitepx, 0, 0, 0, 640, 480, 0, c_black, black_alpha);
204
if (black_alpha > 1.9)
205
{
206
    instance_create(0, 0, obj_thrash_transformation_transition);
207
    room_goto(room_dw_mansion_gigaqueen );
208
}
209
draw_set_halign(fa_left);
210
211
enum e__VW
212
{
213
    XView,
214
    YView,
215
    WView,
216
    HView,
217
    Angle,
218
    HBorder,
219
    VBorder,
220
    HSpeed,
221
    VSpeed,
222
    Object,
223
    Visible,
224
    XPort,
225
    YPort,
226
    WPort,
227
    HPort,
228
    Camera,
229
    SurfaceID
230
}