Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_screenshake_player_Step_0

(view raw script w/o annotations or w/e)
1
var camera_height = camera_get_view_height(view_camera[0])
2
var camera_width = camera_get_view_width(view_camera[0])
3
var x_target = clamp((view_object_original.x - (camera_width div 2)), 0, (room_width - camera_width))
4
var y_target = clamp((view_object_original.y - (camera_height div 2)), 0, (room_height - camera_height))
5
camera_set_view_target(view_camera[0], -4)
6
camera_set_view_pos(view_camera[0], (x_target + (irandom_range((-intensity), intensity))), (y_target + (irandom_range((-intensity), intensity))))