twinblade-infinity/objects/obj_enemy_nova/Step_2.gml

53 lines
1.4 KiB
Plaintext
Raw Normal View History

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
{
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot-20,10);
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot+25,10);
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot+70,10);
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot+115,10);
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot+160,10);
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot+205,10);
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot+250,10);
var ID = instance_create(x,y,obj_enemy_beams);
with (ID) motion_set(other.rot+295,10);
stepy = 0
}
}
if charge > 60
{
firetime = 0
charge = 0
firing = 0
}
}
firetime += 1
if firing < 1 && instance_exists( obj_player_control )
{
move_towards_point(obj_player_control.x,obj_player_control.y,3)
}