Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_cutscene_move_all

(view raw script w/o annotations or w/e)
1
function cutscene_move_all(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
2
{
3
    if (arg0 == false && !instance_exists(obj_camera))
4
    {
5
        instance_create(__view_get(e__VW.Object, 0).x, __view_get(e__VW.Object, 0).y, obj_camera);
6
        __view_set(e__VW.Object, 0, obj_camera);
7
    }
8
    with (all)
9
    {
10
        if (arg5)
11
            x += arg1;
12
        if (arg6)
13
            y += arg1;
14
        if (arg0 == false && object_index == obj_camera)
15
        {
16
            x = xprevious;
17
            y = yprevious;
18
        }
19
    }
20
    for (var i = arg3; i <= arg4; i++)
21
    {
22
        if (arg5)
23
            tile_layer_shift(i, arg1, 0);
24
        if (arg6)
25
            tile_layer_shift(i, 0, arg1);
26
    }
27
    cutscene_timer += abs(arg1);
28
    if (cutscene_timer >= arg2)
29
    {
30
        cutscene_timer = 0;
31
        cutscene_advance();
32
        return true;
33
    }
34
}
35
36
enum e__VW
37
{
38
    XView,
39
    YView,
40
    WView,
41
    HView,
42
    Angle,
43
    HBorder,
44
    VBorder,
45
    HSpeed,
46
    VSpeed,
47
    Object,
48
    Visible,
49
    XPort,
50
    YPort,
51
    WPort,
52
    HPort,
53
    Camera,
54
    SurfaceID
55
}