Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_bq_baseball_final_Other_24

(view raw script w/o annotations or w/e)
1
baseball_combo_timer--;
2
if (hit == -1)
3
{
4
    if (image_xscale < 6)
5
    {
6
        image_xscale += 0.1;
7
        image_yscale += 0.1;
8
    }
9
    x = (xstart - 5) + irandom(10);
10
    y = (ystart - 5) + irandom(10);
11
}
12
if (hit != 1)
13
    image_angle += 3;
14
if (hit == 1)
15
{
16
    hit_timer += 1;
17
    if (hit_timer == 1)
18
    {
19
        repeat (3)
20
        {
21
            fakesplash = instance_create((x - 20) + irandom(40), (y - 20) + irandom(40), o_boxing_splash);
22
            fakesplash.friction = -0.5;
23
            fakesplash.sprite_index = spr_boxing_splash2;
24
            if (hit_direction == -1)
25
                fakesplash.hspeed = -1 - random(2);
26
            if (hit_direction == 1)
27
                fakesplash.hspeed = 1 + random(2);
28
            fakesplash.vspeed = 1 + random(2);
29
        }
30
        xbase = x;
31
        ybase = y;
32
    }
33
    if (hit_timer > 0 && hit_timer < (40 / f))
34
    {
35
        x = (xbase + (40 / hit_timer)) - irandom(80 / hit_timer);
36
        y = (ybase + (40 / hit_timer)) - irandom(80 / hit_timer);
37
    }
38
    if (hit_timer > (100 / f))
39
        vspeed = -64 / f;
40
    if (y < -850)
41
    {
42
        instance_destroy();
43
        instance_create(x, y, obj_bq_baseball_final_hits_boss);
44
    }
45
}
46
if (y > 20 && !instance_exists(o_bq_whitefade) && hit != 1)
47
    instance_create(x, y, o_bq_whitefade);