Deltarune script viewer

← back to main script listing

gml_Object_obj_scissordancer_Step_0

(view raw script w/o annotations or w/e)
1
dancetimer += 1;
2
if (dancetimer >= 30 && dancetimer <= 75)
3
    image_index += 0.25;
4
if (dancetimer >= 112 && dancetimer <= 157)
5
    image_index -= 0.25;
6
if (dancetimer >= 166)
7
    dancetimer = 0;
8
if (specturn == 1)
9
{
10
    if (x >= (xstart + 170) && y <= (ystart + 10))
11
    {
12
        y -= vspeed;
13
        x -= hspeed;
14
        direction -= 90;
15
        x = xstart + 169;
16
    }
17
    if (y >= (ystart + 160))
18
    {
19
        y -= vspeed;
20
        x -= hspeed;
21
        direction -= 90;
22
        y = ystart + 159;
23
    }
24
    if (x <= xstart)
25
    {
26
        y -= vspeed;
27
        x -= hspeed;
28
        direction -= 90;
29
        x = xstart + 1;
30
    }
31
    if (y <= ystart)
32
    {
33
        y -= vspeed;
34
        x -= hspeed;
35
        direction -= 90;
36
        y = ystart + 1;
37
    }
38
}
39
if (myinteract == 1 && sndcon == 0)
40
{
41
    sndcon = 1;
42
    myinteract = 0;
43
}
44
else
45
{
46
    myinteract = 2;
47
}
48
if (sndcon >= 1 && sndcon <= 5)
49
{
50
    sndtimer -= 1;
51
    if (sndtimer <= 0)
52
    {
53
        p = 0.5 + random(0.7);
54
        b = snd_play(snd_scissorbell);
55
        snd_pitch(b, p);
56
        sndcon += 1;
57
        sndtimer = 3;
58
    }
59
}
60
if (sndcon == 6)
61
{
62
    sndtimer += 1;
63
    if (sndtimer >= 15)
64
    {
65
        myinteract = 0;
66
        sndcon = 0;
67
        sndtimer = 0;
68
    }
69
}
70
scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
71
if (i_ex(bullet))
72
{
73
    bullet.x = x + hspeed;
74
    bullet.y = y + vspeed;
75
}