2021-07-11 16:02:15 -07:00
|
|
|
if (instance_exists( obj_player_control ) ) {
|
|
|
|
if distance_to_object(obj_player_control) < 350
|
|
|
|
{
|
|
|
|
final += 1
|
|
|
|
if final = 2
|
|
|
|
{
|
|
|
|
var ID = instance_create(x,y,obj_enemy_beams)
|
|
|
|
with (ID) motion_set(other.direction-10+random(20),10)
|
|
|
|
final = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if point_direction(x,y,obj_player_control.x,obj_player_control.y) > direction
|
|
|
|
{
|
|
|
|
direction += 4
|
|
|
|
}
|
|
|
|
if point_direction(x,y,obj_player_control.x,obj_player_control.y) < direction
|
|
|
|
{
|
|
|
|
direction -= 4
|
|
|
|
}
|
|
|
|
}
|
|
|
|
speed = 5
|
|
|
|
direction = direction
|
2021-06-28 18:46:16 -07:00
|
|
|
|
|
|
|
if hp < 1
|
|
|
|
{
|
|
|
|
score += 10000;
|
|
|
|
instance_destroy();
|
|
|
|
}
|
|
|
|
shield += 1
|
|
|
|
if shield >= 450
|
|
|
|
{
|
|
|
|
shielded = 1
|
|
|
|
}
|
|
|
|
if shield >= 600
|
|
|
|
{
|
|
|
|
shielded = 0
|
|
|
|
shield = 0
|
|
|
|
}
|
2021-07-11 16:02:15 -07:00
|
|
|
|