/// Создание объекта в определенной координате
x = object_player.x;
y = object_player.y;
/// Предмет, крутящийся в сторону мыши игрока
direction = point_direction(x, y, mouse_x, mouse_y);
if (direction > 90) && (direction < 270) image_yscale = -1;
else image_yscale = 1;
image_angle = direction
/// стрельба
if mouse_check_button_released(mb_left) and can = 0 and ammo >= 1
{
can = 1;
ammo -= 1;
alarm[0] = 15;
gun = instance_create_layer(x, y, "Foundation", obj_bullet_gun7);
gun.direction = image_angle;
gun.speed = 10;
gun.image_angle = direction;
}
if ammo <= 0
{