Надо, чтобы он выбирал рандомно одно из этих условий, как сделать, не знаю
Код
if instance_exists(obj_enemy_skelet) {
if point_distance(x, y, obj_enemy_skelet.x, obj_enemy_skelet.y) > sp
{
dir = point_direction(x, y, obj_enemy_skelet.x, obj_enemy_skelet.y);
phy_speed_x = lengthdir_x(sp,dir)
phy_speed_y = lengthdir_y(sp,dir)
}
}
if instance_exists(obj_crystal_demon) {
if point_distance(x, y, obj_crystal_demon.x, obj_crystal_demon.y) > sp
{
dir = point_direction(x, y, obj_crystal_demon.x, obj_crystal_demon.y);
phy_speed_x = lengthdir_x(sp,dir)
phy_speed_y = lengthdir_y(sp,dir)
}
}
if instance_exists(obj_enemy_robot) {
if point_distance(x, y, obj_enemy_robot.x, obj_enemy_robot.y) > sp
{
dir = point_direction(x, y, obj_enemy_robot.x, obj_enemy_robot.y);
phy_speed_x = lengthdir_x(sp,dir)
phy_speed_y = lengthdir_y(sp,dir)
}
}