Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_maus_split_Step_0

(view raw script w/o annotations or w/e)
1
if (mcon == 1)
2
{
3
    hpart = choose(-6, -8, -10, -12);
4
    for (i = 0; i < mousecount; i++)
5
    {
6
        mouse = instance_create(x, y, obj_maus_liddle);
7
        if ((i % 2) == 0)
8
            mouse.hspeed = hpart + random(3);
9
        factor = (maxmousecount * 1.5) / (mousecount + (maxmousecount / 2));
10
        if (mousecount <= 5)
11
            factor = 0.8;
12
        mouse.sineradd *= factor;
13
        mouse.maxamplitude *= factor;
14
    }
15
    basket = instance_create(camerax() + 340, cameray() - 160, obj_maus_split_basket);
16
    mtimer = 0;
17
    mcon = 2;
18
}
19
if (mcon == 2)
20
{
21
    image_xscale = lerp(image_xscale, 0, 0.1);
22
    image_yscale = lerp(image_xscale, 0, 0.1);
23
    mtimer++;
24
    if (mtimer == 300)
25
    {
26
        with (obj_maus_liddle)
27
        {
28
            if (captured == 0)
29
                con = 2;
30
        }
31
        with (obj_maus_split_basket)
32
        {
33
            if (con == 1)
34
            {
35
                con = 10;
36
                vspeed = -6;
37
                endtimer = 0;
38
            }
39
        }
40
    }
41
    if (mtimer >= 360 || !instance_exists(obj_maus_liddle))
42
        mcon = 3;
43
}
44
if (mcon == 3)
45
{
46
    image_xscale = lerp(image_xscale, 2, 0.2);
47
    image_yscale = lerp(image_xscale, 2, 0.2);
48
    if (image_xscale >= 1.95)
49
    {
50
        if (mercycount > 0)
51
            image_xscale = 2;
52
        image_yscale = 2;
53
        mcon = 0;
54
        with (obj_mauswheel_enemy)
55
        {
56
            actcon = 18;
57
            
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; if (i_ex(obj_dmgwriter)) { with (obj_dmgwriter) { if (type == 5) _playsound = 0; } } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, obj_maus_split.mercycount);
58
            if (obj_maus_split.mercycount == 0)
59
                obj_mauswheel_enemy.actfailure = 1;
60
            if (global.mercymod[myself] >= 100)
61
                actcon = 19;
62
        }
63
        instance_destroy();
64
        with (obj_maus_split)
65
            instance_destroy();
66
    }
67
}