2021-06-28 18:46:16 -07:00
|
|
|
if hp < 1
|
|
|
|
{
|
|
|
|
score += 2000
|
|
|
|
instance_destroy()
|
|
|
|
}
|
|
|
|
|
|
|
|
if firetime > 200
|
|
|
|
{
|
|
|
|
stepy += 1
|
|
|
|
if charge < 16
|
|
|
|
{
|
|
|
|
charge += 1
|
|
|
|
}
|
|
|
|
if charge > 15
|
|
|
|
{
|
|
|
|
firing = 1
|
|
|
|
firetime += 1
|
|
|
|
speed = 0
|
|
|
|
if stepy > 4
|
|
|
|
{
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot-20,10);
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot+25,10);
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot+70,10);
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot+115,10);
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot+160,10);
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot+205,10);
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot+250,10);
|
2021-07-11 16:02:15 -07:00
|
|
|
var ID = instance_create(x,y,obj_enemy_beams);
|
2021-06-28 18:46:16 -07:00
|
|
|
with (ID) motion_set(other.rot+295,10);
|
|
|
|
stepy = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if charge > 60
|
|
|
|
{
|
|
|
|
firetime = 0
|
|
|
|
charge = 0
|
|
|
|
firing = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
firetime += 1
|
2021-07-11 16:02:15 -07:00
|
|
|
if firing < 1 && instance_exists( obj_player_control )
|
2021-06-28 18:46:16 -07:00
|
|
|
{
|
|
|
|
move_towards_point(obj_player_control.x,obj_player_control.y,3)
|
|
|
|
}
|
2021-07-11 16:02:15 -07:00
|
|
|
|