2021-06-28 18:46:16 -07:00
|
|
|
step += 1;
|
2021-07-11 16:02:15 -07:00
|
|
|
speed = 6;
|
2021-06-28 18:46:16 -07:00
|
|
|
if hp < 1
|
|
|
|
{
|
|
|
|
score += 500;
|
|
|
|
instance_destroy();
|
|
|
|
}
|
|
|
|
|
2021-07-11 16:02:15 -07:00
|
|
|
if (instance_exists( obj_player_control ) ) {
|
|
|
|
if step > 4
|
|
|
|
{
|
|
|
|
if distance_to_object(obj_player_control) < 250
|
|
|
|
{
|
|
|
|
step = 0
|
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
|
|
|
with (ID) motion_set(other.direction-5+random(10),10);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if point_direction(x,y,obj_player_control.x,obj_player_control.y) > direction
|
|
|
|
{
|
|
|
|
direction += 5;
|
|
|
|
}
|
|
|
|
if point_direction(x,y,obj_player_control.x,obj_player_control.y) < direction
|
|
|
|
{
|
|
|
|
direction -= 5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-28 18:46:16 -07:00
|
|
|
|