sEDCam 0 0 0 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 target_obj = -4; dist_x = 280; //+ (oControl.widescreen_space/2); dist_y = 180; 1 603 7 0 0 -1 2 self 0 0 1 /// Camera restrictions if (oControl.widescreen_space + 320 <= room_width) { // widescreen rooms prevent black bars var limit = floor(oControl.widescreen_space/2)+160; x = clamp(x, limit, room_width-limit); } else { // single-wide rooms x = floor(room_width/2); } 1 603 7 0 0 -1 2 self 0 0 1 if (instance_exists(target_obj)) { x = target_obj.x + (oCharacter.x - target_obj.x) / 2; y = target_obj.y + (oCharacter.y - target_obj.y) / 2; if (abs(oCharacter.x - target_obj.x) < dist_x && abs(oCharacter.y - target_obj.y) < dist_y) { oCamera.smootin = 30; if (oCamera.focus == 0) { oCamera.focus = 1; oCamera.focustime = 0; } oCamera.focustime += 1; oCamera.lockx = 1; oCamera.locky = 1; oCamera.targetx = x; oCamera.targety = y; oCamera.snapx = 0; oCamera.snapy = 0; oCamera.smoothout = 40; oCamera.alarm[0] = 2; } } 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 0