Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_rocketpunch_fist_Step_0

(view raw script w/o annotations or w/e)
1
if (con >= 1 && timer < 4)
2
    timer = 4;
3
timer++;
4
if (timer == 5)
5
{
6
    timer = 0;
7
    gas = instance_create(x, y, obj_rocketpunch_afterimage);
8
    if (con >= 1)
9
        gas.vspeed = -16;
10
}
11
if (con == 1)
12
{
13
    con = 2;
14
    timerb = 0;
15
    snd_play(snd_rocket_long);
16
    snd_play(snd_bomb);
17
}
18
if (con == 2)
19
{
20
    timerb++;
21
    x = lerp(x, (320 - (sprite_width / 2)) + 50 + 10, 0.2);
22
    y = lerp(y, -420 + timerb, 0.2);
23
    x += random_range(-4, 4);
24
    y += random_range(-4, 4);
25
    if (timerb == 60)
26
        instance_create((320 - (sprite_width / 2)) + 10, 100, obj_rocketpunch_bhero);
27
    if (timerb == 74)
28
        snd_play(snd_explosion);
29
    if (timerb >= 10)
30
    {
31
        image_xscale = lerp(image_xscale, 4, 0.04);
32
        image_yscale = lerp(image_yscale, 4, 0.04);
33
    }
34
}