Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_o_coaster_jama_Step_0

(view raw script w/o annotations or w/e)
1
if (type == 0)
2
{
3
    if (con == 0)
4
    {
5
        if (chancer == 1)
6
            sprite_index = spr_coaster_barricade_alt;
7
        contimer++;
8
        flashtimer++;
9
        if (flashtimer == 2)
10
        {
11
            if (image_alpha == 0)
12
                image_alpha = 1;
13
            else
14
                image_alpha = 0;
15
            flashtimer = 0;
16
        }
17
        if (contimer >= waitamount && image_alpha == 1)
18
            con = 1;
19
    }
20
    if (con == 1)
21
    {
22
        hspeed = -2;
23
        gravity_direction = 180;
24
        gravity = 0.5;
25
        con = 2;
26
    }
27
    if (con == 2)
28
    {
29
        if (x <= -20)
30
            instance_destroy();
31
    }
32
}
33
if (type == 1)
34
{
35
    contimer++;
36
    if (contimer >= waitamount)
37
    {
38
        active = 0;
39
        image_alpha -= 0.1;
40
        if (image_alpha <= 0)
41
            instance_destroy();
42
    }
43
}