Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_lancer_card_Draw_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    timer++;
4
    if (timer == 1)
5
        snd_play_pitch(snd_spellcast, 1.4);
6
    y = lerp(y, ystart - 45, 0.16);
7
    if (timer > 14)
8
        circlealpha -= 0.2;
9
    if (timer == 20)
10
    {
11
        timer = 0;
12
        con = 1;
13
        snd_play(snd_stardrop);
14
    }
15
}
16
if (con == 1)
17
{
18
    timer++;
19
    if (timer < 11)
20
        whitefgalpha += 0.1;
21
    if (timer >= 14)
22
    {
23
        whitefgalpha -= 0.1;
24
        circlealpha = 0;
25
        image_alpha = 0;
26
        splatsoundtimer++;
27
        if (splatsoundtimer == 1)
28
            snd_play_x(snd_splat, 1, 0.9);
29
        if (splatsoundtimer == 12)
30
            snd_play_x(snd_splat, 0.6, 0.9);
31
        if (splatsoundtimer == 24)
32
            snd_play_x(snd_splat, 0.3, 0.9);
33
        if (splatsoundtimer == 36)
34
            snd_play_x(snd_splat, 0.1, 0.9);
35
        if (splatsoundtimer == 48)
36
            snd_play_x(snd_splat, 0.05, 0.9);
37
    }
38
    if (timer >= 64)
39
    {
40
        instance_destroy();
41
        audio_resume_sound(global.batmusic[1]);
42
    }
43
}
44
siner += 4;
45
var scale = 0.7 + (sin(siner / 6) * 0.1);
46
draw_sprite_ext(spr_sneo_bigcircle, image_index, x, y - 36, scale, scale, image_angle, image_blend, circlealpha);
47
draw_sprite_ext(sprite_index, image_index, x - 1, y - 10, image_xscale, image_yscale, image_angle, image_blend, image_alpha);