twinblade-infinity/objects/obj_enemy_drain/Step_2.gml

22 lines
431 B
Plaintext
Raw Normal View History

if hp < 1
{
score += 2000
instance_destroy();
}
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;
}
move_towards_point(obj_player_control.x,obj_player_control.y,4);
firing = 0