2021-06-28 18:46:16 -07:00
|
|
|
if hp < 1
|
|
|
|
{
|
|
|
|
score += 2000
|
|
|
|
instance_destroy();
|
|
|
|
}
|
2021-07-11 16:02:15 -07:00
|
|
|
if (instance_exists( obj_player_control) ) {
|
|
|
|
direction = point_direction(x,y,obj_player_control.x,obj_player_control.y)
|
|
|
|
if (point_distance(x,y,obj_player_control.x,obj_player_control.y) < 125)
|
|
|
|
{
|
|
|
|
firing = 1;
|
|
|
|
speed = 0;
|
|
|
|
if global.shield < 1
|
|
|
|
{
|
|
|
|
global.player_hp -= 5
|
|
|
|
}
|
|
|
|
hp -= 1
|
|
|
|
exit;
|
2021-06-28 18:46:16 -07:00
|
|
|
}
|
|
|
|
move_towards_point(obj_player_control.x,obj_player_control.y,4);
|
2021-07-11 16:02:15 -07:00
|
|
|
}
|
2021-06-28 18:46:16 -07:00
|
|
|
firing = 0
|
2021-07-11 16:02:15 -07:00
|
|
|
|