Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_camera_move

(view raw script w/o annotations or w/e)
1
function scr_camera_move
scr_camera_move

function scr_camera_move(argument0, argument1, argument2) //gml_Script_scr_camera_move { if (!instance_exists(obj_camera)) { instance_create(__view_get((9 << 0), 0).x, __view_get((9 << 0), 0).y, obj_camera) __view_set((9 << 0), 0, 1120) } else { obj_camera.x = __view_get((9 << 0), 0).x obj_camera.y = __view_get((9 << 0), 0).y __view_set((9 << 0), 0, 1120) } obj_camera.move = true obj_camera.xx = argument0 obj_camera.yy = argument1 obj_camera.spd = argument2 if (abs(argument0 - obj_camera.x) <= argument2 && abs(argument1 - obj_camera.y) <= argument2) return true; else return false; }
(argument0, argument1, argument2) //gml_Script_scr_camera_move
2
{
3
    if (!instance_exists(obj_camera))
4
    {
5
        instance_create(__view_get((9 << 0), 0).x, __view_get((9 << 0), 0).y, obj_camera)
6
        __view_set((9 << 0), 0, 1120)
7
    }
8
    else
9
    {
10
        obj_camera.x = __view_get((9 << 0), 0).x
11
        obj_camera.y = __view_get((9 << 0), 0).y
12
        __view_set((9 << 0), 0, 1120)
13
    }
14
    obj_camera.move = true
15
    obj_camera.xx = argument0
16
    obj_camera.yy = argument1
17
    obj_camera.spd = argument2
18
    if (abs(argument0 - obj_camera.x) <= argument2 && abs(argument1 - obj_camera.y) <= argument2)
19
        return true;
20
    else
21
        return false;
22
}