Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_titan_tower_divit_Draw_0

(view raw script w/o annotations or w/e)
1
rotationsiner += 0.1;
2
if (rotationsiner > 6.4)
3
    rotationsiner -= 6.4;
4
if (rotationsiner >= 0.53 && rotationsiner < 2.6)
5
    depth = obj_rotating_tower_controller.depth + 50;
6
else
7
    depth = obj_mainchara.depth - 10;
8
var a = sin(rotationsiner + 1.57);
9
if (a > 0)
10
{
11
}
12
else
13
{
14
}
15
draw_sprite_ext(sprite_index, image_index, x, y, a, image_yscale, image_angle, image_blend, image_alpha);
16
if (rotationsiner >= 0.53 && rotationsiner < 2.6)
17
    darken_alpha = 1;
18
if (rotationsiner >= 3.2 && rotationsiner < 6.4)
19
    darken_alpha = 0;
20
if (rotationsiner >= 0 && rotationsiner < 0.53)
21
    darken_alpha = lerp(0, 1, rotationsiner / 0.53);
22
if (rotationsiner >= 2.6 && rotationsiner < 3.2)
23
    darken_alpha = lerp(1, 0, (rotationsiner - 2.6) / 0.53);
24
d3d_set_fog(true, c_black, 0, 1);
25
draw_sprite_ext(sprite_index, image_index, x, y, a, image_yscale, image_angle, image_blend, darken_alpha);
26
d3d_set_fog(false, c_black, 0, 0);