Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_incense_cloud_Draw_0

(view raw script w/o annotations or w/e)
1
if (type == 0)
2
{
3
    if (con == 1)
4
    {
5
        dietimer++;
6
        if (dietimer == 1)
7
        {
8
            fx = instance_create(x, y, obj_incense_cloud_destroyed);
9
            fx.image_xscale = image_xscale;
10
            fx.image_yscale = image_yscale;
11
            fx.image_angle = image_angle;
12
        }
13
        if (dietimer == 3)
14
            instance_destroy();
15
    }
16
}
17
if (type == 1)
18
{
19
    if (con == 1)
20
    {
21
        dietimer++;
22
        if (dietimer == 1)
23
        {
24
            snd_stop(snd_wing);
25
            snd_play(snd_wing);
26
            alpha1 = 1.5;
27
        }
28
        alpha2 += 0.2;
29
        if (dietimer == 4)
30
        {
31
            repeat (4)
32
            {
33
                var dir = 0 + random(180);
34
                var len = 10 + random(10);
35
                fireanim = instance_create_depth(-9999, -9999, depth - 1, obj_incense_fire_anim);
36
                fireanim.sprite_index = spr_turtle_cloud_fire1;
37
                fireanim.image_speed = 0.5;
38
                fireanim.parentid = id;
39
                fireanim.len = len;
40
                fireanim.dir = dir;
41
            }
42
        }
43
        if (dietimer == 15)
44
        {
45
            fx = instance_create(x, y, obj_incense_cloud_destroyed);
46
            fx.image_xscale = image_xscale;
47
            fx.image_yscale = image_yscale;
48
            fx.image_angle = image_angle;
49
            fx.type = 2;
50
        }
51
        if (dietimer == 15)
52
            instance_destroy();
53
        var col = merge_color(c_white, c_orange, 0.7);
54
        draw_sprite_ext(spr_incense_could_fuzzy2, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, alpha2);
55
    }
56
}
57
if (type == 2)
58
{
59
    if (con == 1)
60
    {
61
        dietimer++;
62
        if (dietimer == 1)
63
        {
64
            snd_play(snd_wing);
65
            alpha1 = 1;
66
        }
67
        alpha1 -= 0.2;
68
        alpha2 += 0.05;
69
        if (dietimer == 5)
70
        {
71
            fx = instance_create(x, y, obj_incense_cloud_destroyed);
72
            fx.image_xscale = image_xscale;
73
            fx.image_yscale = image_yscale;
74
            fx.image_angle = image_angle;
75
            fx.type = 2;
76
        }
77
        if (dietimer == 8)
78
            instance_destroy();
79
        var col = merge_color(c_white, c_orange, 0.7);
80
        draw_sprite_ext(spr_incense_could_fuzzy2, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, 1);
81
        draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, alpha1);
82
    }
83
}
84
grazetimer++;
85
if (grazetimer == 10)
86
{
87
    grazetimer = 0;
88
    grazed = 0;
89
}