sSMissile 0 -1 0 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 visible = 0; can_camera = 1; velocity_x = 0; velocity_y = 0; 1 603 7 0 0 -1 2 self 0 0 1 // basic camera buttons if (keyboard_check(ord("A"))){ velocity_x -= 1; } if (keyboard_check(ord("D"))){ velocity_x += 1; } if (keyboard_check(ord("W"))){ velocity_y -= 1; } if (keyboard_check(ord("S"))){ velocity_y += 1; } if (!keyboard_check(ord("A")) && !keyboard_check(ord("D"))){ if !(velocity_x == 0){ if (velocity_x > 0){ velocity_x -= 1; }else{ velocity_x += 1; } } } if (!keyboard_check(ord("W")) && !keyboard_check(ord("S"))){ if !(velocity_y == 0){ if (velocity_y > 0){ velocity_y -= 1; }else{ velocity_y += 1; } } } if ((instance_exists(oEditorInfo))){ velocity_x = 0; velocity_y = 0; } // clamps var x_t = 3; if (keyboard_check(vk_shift)) then x_t = 9; velocity_x = clamp(velocity_x,-x_t,x_t); velocity_y = clamp(velocity_y,-x_t,x_t); // move the camera! x += velocity_x; y += velocity_y; // .. and cap it at the edges! if (x < 160) then x = 160; if (x > room_width-160) then x = room_width-160; if (y < 120) then y = 120; if (y > room_height-120) then y = room_height-120; 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 0