Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_swing_down_new_Draw_0

(view raw script w/o annotations or w/e)
1
if (image_angle < 1)
2
{
3
    if (i_ex(obj_sound_of_justice_enemy))
4
    {
5
        d3d_set_fog(true, c_black, 0, 1);
6
        draw_sprite_ext(sprite_index, image_index, x + 14, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
7
        d3d_set_fog(false, c_black, 0, 0);
8
    }
9
    else
10
    {
11
        draw_sprite_ext(sprite_index, image_index, x + 14, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha);
12
    }
13
    if (eye_con == 1)
14
    {
15
        if (eye_index == 0)
16
        {
17
            snd_play_pitch(snd_eye_telegraph, 1);
18
            var _x = 0;
19
            if (version == 1)
20
                _x = -6;
21
            var _image_angle = image_angle;
22
            if (image_angle < 0)
23
                _image_angle = 0;
24
            inst = instance_create(x + _x + lengthdir_x(15, 270 + _image_angle), y + lengthdir_y(15, 270 + _image_angle), obj_gerson_growtangle_telegraph_new);
25
            inst.image_angle = _image_angle;
26
            if (i_ex(obj_heart))
27
                inst.depth = obj_heart.depth + 1;
28
        }
29
        if (alphacon == 0)
30
        {
31
            alpha += 0.2;
32
            if (alpha == 1.2)
33
                alphacon = 1;
34
        }
35
        else
36
        {
37
            alpha -= 0.2;
38
        }
39
        d3d_set_fog(true, c_white, 0, 1);
40
        draw_sprite_ext(sprite_index, image_index, x + 14, y, image_xscale, image_yscale, image_angle, image_blend, alpha);
41
        d3d_set_fog(false, c_black, 0, 0);
42
        eye_index += 0.4;
43
        if (swingdowntype == 1)
44
            eye_index += 0.6;
45
        if (eye_index >= 5)
46
            eye_con = 0;
47
    }
48
}
49
else
50
{
51
    if (i_ex(obj_sound_of_justice_enemy))
52
    {
53
        d3d_set_fog(true, c_black, 0, 1);
54
        draw_sprite_ext(sprite_index, image_index, x + lengthdir_x(14, image_angle + 90), y + lengthdir_y(14, image_angle + 90), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
55
        d3d_set_fog(false, c_black, 0, 0);
56
    }
57
    else
58
    {
59
        draw_sprite_ext(sprite_index, image_index, x + lengthdir_x(14, image_angle + 90), y + lengthdir_y(14, image_angle + 90), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
60
    }
61
    if (eye_con == 1)
62
    {
63
        if (eye_index == 0)
64
        {
65
            snd_play_pitch(snd_eye_telegraph, 1);
66
            var _x = 0;
67
            if (version == 1)
68
                _x = -6;
69
            var _image_angle = image_angle;
70
            if (image_angle < 0)
71
                _image_angle = 0;
72
            inst = instance_create(x + _x + lengthdir_x(15, 270 + _image_angle), y + lengthdir_y(15, 270 + _image_angle), obj_gerson_growtangle_telegraph_new);
73
            inst.image_angle = _image_angle;
74
            if (image_angle == 270)
75
            {
76
                with (inst)
77
                {
78
                    image_xscale = 1;
79
                    sprite_index = spr_gerson_swing_down_telegraph3;
80
                }
81
            }
82
            if (i_ex(obj_heart))
83
                inst.depth = obj_heart.depth + 1;
84
        }
85
        if (alphacon == 0)
86
        {
87
            alpha += 0.2;
88
            if (alpha == 1.2)
89
                alphacon = 1;
90
        }
91
        else
92
        {
93
            alpha -= 0.2;
94
        }
95
        d3d_set_fog(true, c_white, 0, 1);
96
        draw_sprite_ext(sprite_index, image_index, x + lengthdir_x(14, image_angle + 90), y + lengthdir_y(14, image_angle + 90), image_xscale, image_yscale, image_angle, image_blend, alpha);
97
        d3d_set_fog(false, c_black, 0, 0);
98
        eye_index += 0.4;
99
        if (swingdowntype == 1)
100
            eye_index += 0.6;
101
        if (eye_index >= 5)
102
            eye_con = 0;
103
    }
104
}