Deltarune script viewer

← back to main script listing

gml_Object_obj_sneo_elevator_test_Step_0

(view raw script w/o annotations or w/e)
1
if (movecon == 1)
2
    movecon = 2;
3
if (movecon == 2)
4
{
5
    yspeed = 15;
6
    if (abs(ypos[idealpos] - y) > yspeed)
7
    {
8
        if (ypos[idealpos] < y)
9
        {
10
            y -= yspeed;
11
            heartobj.y -= yspeed / 1.2;
12
        }
13
        if (ypos[idealpos] > y)
14
        {
15
            y += yspeed;
16
            heartobj.y += yspeed / 1.2;
17
        }
18
    }
19
    else
20
    {
21
        y = ypos[idealpos];
22
        pos = idealpos;
23
        movecon = 0;
24
    }
25
}
26
bullettimer++;
27
if (bullettimer >= 20)
28
{
29
    bullettimer = 0;
30
    if (lightningcon > 0 && lightninghandicap == 1)
31
        bullettimer = -10;
32
    if (bulletcount == 3)
33
        bullettimer = -7;
34
    if (bulletcount == 4)
35
    {
36
        bullettimer = 90;
37
        bulletcount = 0;
38
    }
39
    bulletcount++;
40
}
41
if (lightningcon == 1)
42
{
43
    n = 0;
44
    lightningtimer = 0;
45
    for (j = 0; j < 2; j++)
46
    {
47
        for (i = 0; i < 2; i++)
48
            n++;
49
    }
50
    lightningcon = 2;
51
}
52
if (lightningcon == 2)
53
{
54
    lightningtimer++;
55
    i = 0;
56
    while (i < n)
57
        i++;
58
}