Deltarune script viewer

← back to main script listing

gml_Object_obj_sneo_crusher_nohead_Step_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_sneo_crusher))
2
    depth = obj_sneo_crusher.depth;
3
if (image_yscale < 0 && init == 0)
4
{
5
    image_yscale -= 2;
6
    if (image_yscale < -16.125)
7
    {
8
        image_yscale = -16.125;
9
        init = 1;
10
        hspeed = obj_spamton_neo_enemy.crusher_start_hspeed;
11
    }
12
    exit;
13
}
14
if (image_yscale > 0 && init == 0)
15
{
16
    image_yscale += 2;
17
    if (image_yscale > 16.125)
18
    {
19
        image_yscale = 16.125;
20
        init = 1;
21
        hspeed = obj_spamton_neo_enemy.crusher_start_hspeed;
22
    }
23
    exit;
24
}
25
hspeed -= haccel;
26
if (vbounce == 1 && column == 0)
27
{
28
    if (y > bottomy)
29
    {
30
        y = bottomy - 1;
31
        vspeed = -abs(vspeed);
32
    }
33
    if (y < topy)
34
    {
35
        y = topy + 1;
36
        vspeed = abs(vspeed);
37
    }
38
}
39
if (column == 1)
40
{
41
    haccel = 0.3;
42
    siner++;
43
    y -= (sin(siner / 4) * amplitude);
44
}