Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_new_home_parallax_background_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
parallax_x_multiplier[0] = 0.05
4
parallax_x_multiplier[1] = 0.07142857142857142
5
parallax_x_multiplier[2] = 0.1
6
var dist_cam = x - (camera_get_view_x(view_camera[0]) + 160)
7
parallax_x[0] = x + dist_cam * parallax_x_multiplier[0]
8
parallax_x[1] = x + dist_cam * parallax_x_multiplier[1]
9
parallax_x[2] = x + dist_cam * parallax_x_multiplier[2]
10
parallax_y_multiplier[0] = 0.2
11
parallax_y_multiplier[1] = 0.1
12
parallax_y_multiplier[2] = 0
13
var dist_cam_y = y - (camera_get_view_y(view_camera[0]) + 120)
14
parallax_y[0] = y - 20 + parallax_y_multiplier[0] + dist_cam_y * parallax_y_multiplier[0]
15
parallax_y[1] = y + parallax_y_multiplier[1] * 120 + dist_cam_y * parallax_y_multiplier[1]
16
parallax_y[2] = y + parallax_y_multiplier[2] * 60 + dist_cam_y * parallax_y_multiplier[2]