Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_maus_liddle_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    timer++;
4
    if (timer >= 20)
5
    {
6
        timer = 0;
7
        fakey = 0;
8
        con = 1;
9
        hspeed = 0;
10
        vspeed = 0;
11
    }
12
}
13
if (con == 1)
14
{
15
    siner += sineradd;
16
    x += random_range(1, -1);
17
    y += random_range(1, -1);
18
    amplitude = lerp(amplitude, maxamplitude, 0.2);
19
    x += (sin(siner / 8) * amplitude);
20
    x = clamp(x, xx + 200, xx + 600);
21
    y = clamp(y, yy + 40, yy + 240);
22
    timer++;
23
    btimer = 0;
24
}
25
if (con == 5)
26
{
27
}
28
if (captured == 1)
29
{
30
    if (instance_exists(obj_maus_split_basket))
31
    {
32
        image_alpha = obj_maus_split_basket.image_alpha;
33
        if (image_alpha <= 0.2)
34
            instance_destroy();
35
    }
36
}
37
if (con == 2)
38
{
39
    if (!i_ex(creator))
40
    {
41
        instance_destroy();
42
    }
43
    else
44
    {
45
        timer++;
46
        if (timer >= 3)
47
        {
48
            timer = 0;
49
            move_towards_point(creator.x + (creator.sprite_width / 2), creator.y + (creator.sprite_height / 2), 10 + random(6));
50
        }
51
        btimer++;
52
        if (btimer >= 30)
53
        {
54
            with (creator)
55
            {
56
                if (mcon == 2)
57
                    mcon = 3;
58
            }
59
            image_xscale -= 0.2;
60
            image_yscale -= 0.2;
61
            if (image_xscale <= 0)
62
                instance_destroy();
63
        }
64
    }
65
}