Deltarune script viewer

← back to main script listing

gml_Object_obj_sneo_bigshot_Step_0

(view raw script w/o annotations or w/e)
1
if (sprite_index == spr_sneo_bigshot_l)
2
{
3
    timer2++;
4
    if (timer2 < 11)
5
    {
6
        if (instance_exists(obj_sneo_lastattack))
7
            depth = obj_sneo_lastattack.depth + 1;
8
    }
9
    else if (instance_exists(obj_sneo_lastattack))
10
    {
11
        depth = obj_sneo_lastattack.depth - 1;
12
    }
13
    if (timer2 < 16)
14
    {
15
        image_xscale = lerp(0, 2, timer2 / 15);
16
        image_yscale = lerp(0, 2, timer2 / 15);
17
    }
18
    if (timer2 == 15)
19
    {
20
        hspeed = -1;
21
        friction = -0.05;
22
    }
23
    x += random_range(-1, 1);
24
    y = ystart + random_range(-4, 4);
25
    if (x < (camerax() + 400))
26
    {
27
        event_user(0);
28
        playerhit = 1;
29
        damage = 0;
30
        if (instance_exists(obj_sneo_lastattack))
31
            obj_sneo_lastattack.endattack = 2;
32
    }
33
}
34
else
35
{
36
    image_xscale = lerp(image_xscale, 2, 0.2);
37
}
38
if (timer != 0)
39
    timer++;
40
if (timer > 13)
41
{
42
    instance_create(camerax() + 320, cameray() + 240, obj_sneo_smoke);
43
    instance_destroy();
44
    snd_volume(snd_rumble, 0, 70);
45
    obj_spamton_neo_enemy.stoprumblesfx = 70;
46
}