Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_swing_down_mask_Draw_0

(view raw script w/o annotations or w/e)
1
draw_self();
2
if (eye_con == 1)
3
{
4
    if (eye_index == 0)
5
    {
6
        afterimage = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
7
        afterimage.vspeed = 2.5;
8
        afterimage.image_alpha = 0.6;
9
        afterimage = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
10
        afterimage.vspeed = -2.5;
11
        afterimage.image_alpha = 0.6;
12
        afterimage = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
13
        afterimage.hspeed = 2.5;
14
        afterimage.image_alpha = 0.6;
15
        afterimage = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
16
        afterimage.hspeed = -2.5;
17
        afterimage.image_alpha = 0.6;
18
        snd_play_pitch(snd_eye_telegraph, 1);
19
        if (swingdowntype == 10)
20
        {
21
            var ylocation = y + 26;
22
            if (ylocation < (obj_growtangle.y - 70))
23
                ylocation = obj_growtangle.y - 70;
24
            if (ylocation > obj_growtangle.y)
25
                ylocation = obj_growtangle.y;
26
            inst = instance_create((obj_growtangle.x - 75) + 5, ylocation, obj_gerson_growtangle_telegraph);
27
            inst.image_xscale = 142;
28
            inst.image_yscale = 72;
29
            if (i_ex(obj_heart))
30
                inst.depth = obj_heart.depth + 1;
31
            snd_play_pitch(snd_eye_telegraph, 0.95);
32
        }
33
        else if (swingdowntype == 11)
34
        {
35
            var ylocation = obj_growtangle.y;
36
            inst = instance_create((obj_growtangle.x - 75) + 5, ylocation, obj_gerson_growtangle_telegraph);
37
            inst.image_xscale = 142;
38
            inst.image_yscale = 72;
39
            if (i_ex(obj_heart))
40
                inst.depth = obj_heart.depth + 1;
41
            snd_play_pitch(snd_eye_telegraph, 0.95);
42
        }
43
        else if (swingdowntype == 12)
44
        {
45
            var ylocation = obj_growtangle.y - 70;
46
            inst = instance_create((obj_growtangle.x - 75) + 5, ylocation, obj_gerson_growtangle_telegraph);
47
            inst.image_xscale = 142;
48
            inst.image_yscale = 72;
49
            if (i_ex(obj_heart))
50
                inst.depth = obj_heart.depth + 1;
51
            snd_play_pitch(snd_eye_telegraph, 0.95);
52
        }
53
        else if (x == (camerax() + 268 + 62))
54
        {
55
            inst = instance_create((obj_growtangle.x - 75) + 5, (obj_growtangle.y - 75) + 5, obj_gerson_growtangle_telegraph);
56
            inst.image_xscale = 70;
57
            inst.image_yscale = 142;
58
            if (i_ex(obj_heart))
59
                inst.depth = obj_heart.depth + 1;
60
        }
61
        else if (x == ((camerax() + 378) - 62))
62
        {
63
            inst = instance_create(obj_growtangle.x, (obj_growtangle.y - 75) + 5, obj_gerson_growtangle_telegraph);
64
            inst.image_xscale = 72;
65
            inst.image_yscale = 142;
66
            if (i_ex(obj_heart))
67
                inst.depth = obj_heart.depth + 1;
68
        }
69
        else
70
        {
71
            var xlocation = (x + 52) - 36;
72
            if (xlocation < (obj_growtangle.x - 70))
73
                xlocation = obj_growtangle.x - 70;
74
            if (xlocation > obj_growtangle.x)
75
                xlocation = obj_growtangle.x;
76
            inst = instance_create(xlocation, (obj_growtangle.y - 75) + 5, obj_gerson_growtangle_telegraph);
77
            inst.image_xscale = 72;
78
            inst.image_yscale = 142;
79
            if (i_ex(obj_heart))
80
                inst.depth = obj_heart.depth + 1;
81
        }
82
    }
83
    if (alphacon == 0)
84
    {
85
        alpha += 0.2;
86
        if (alpha == 1.2)
87
            alphacon = 1;
88
    }
89
    else
90
    {
91
        alpha -= 0.2;
92
    }
93
    d3d_set_fog(true, c_white, 0, 1);
94
    draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, alpha);
95
    d3d_set_fog(false, c_black, 0, 0);
96
    eye_index += 0.4;
97
    if (swingdowntype == 1)
98
        eye_index += 0.6;
99
    if (eye_index >= 5)
100
        eye_con = 0;
101
}