Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_omawaroid_street_Step_0

(view raw script w/o annotations or w/e)
1
nexty += driveSpeed;
2
if (nexty > (obj_growtangle.y + ((obj_growtangle.sprite_height / 2) - 4)))
3
    nexty -= (obj_growtangle.sprite_height - 8);
4
y = nexty;
5
if (anti_cheese == 0 || anti_cheese == 1)
6
{
7
    cheese_timer++;
8
    if (obj_heart.x != heart_xstart)
9
    {
10
        if (anti_cheese == 1)
11
            scr_debug_print("");
12
        anti_cheese = -1;
13
    }
14
    else if (cheese_timer >= 45 && anti_cheese == 0)
15
    {
16
        scr_debug_print("");
17
        anti_cheese = 1;
18
    }
19
}
20
if (carhit > 0 && hitcheck != 0)
21
{
22
    if (hitcheck == -1)
23
    {
24
        with (obj_omawaroid_enemy)
25
            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, 100);
26
    }
27
    with (obj_monsterparent)
28
    {
29
        if (global.mercymod[myself] < 100)
30
            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, 50);
31
    }
32
    hitcheck = 0;
33
}