Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_move_precise_Other_10

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    init = 1;
4
    if (type == 0)
5
    {
6
        movemax = 8;
7
        xx[0] = -12;
8
        xx[1] = -6;
9
        xx[2] = -2;
10
        xx[3] = 4;
11
        xx[4] = 6;
12
        xx[5] = 10;
13
        image[0] = 0;
14
        image[2] = 1;
15
        image[4] = 2;
16
        image[6] = 3;
17
    }
18
    if (type == 1)
19
    {
20
        movemax = 8;
21
        xx[0] = -10;
22
        yy[0] = -3;
23
        xx[1] = 5;
24
        yy[1] = -1;
25
        xx[2] = -3;
26
        yy[2] = 1;
27
        xx[3] = 2;
28
        yy[3] = 3;
29
        xx[4] = -1;
30
        xx[5] = 1;
31
        image[0] = 0;
32
        image[2] = 1;
33
        image[4] = 2;
34
        image[6] = 3;
35
    }
36
    if (type == 2)
37
    {
38
        movemax = 8;
39
        yy[0] = -6;
40
        yy[1] = -2;
41
        yy[2] = 0;
42
        yy[3] = 0;
43
        yy[4] = 1;
44
        yy[5] = 3;
45
        yy[6] = 4;
46
        image[0] = 0;
47
        image[2] = 1;
48
        image[4] = 2;
49
        image[6] = 3;
50
    }
51
    if (i_ex(target))
52
    {
53
        target.x += xx[movecount] * xOrientation;
54
        target.y += yy[movecount] * yOrientation;
55
        if (image[movecount] != -1 && o_boxingcontroller.wireframe_boxing == 0)
56
            target.image_index = image[movecount];
57
    }
58
    movecount++;
59
    moved = 1;
60
}