I fixed it myself, was at first trying to do something with the view mat, but got a cool rotation 3d effect.
3d effect was:
var vm = matrix_build_lookat(x,y,-10, x = clamp(x, HALF_OF_VIEW_WIDTH, room_width-HALF_OF_VIEW_WIDTH),clamp(y, HALF_OF_VIEW_HEIGHT, room_height-HALF_OF_VIEW_HEIGHT),0,0,1,0);
Solution for me: added:
x = clamp(x, 72, room_width-72); // 72 and 128 are half my room width and height.
y= clamp(y,128, room_height-128);
after the if (follow) statement.