29 lines
544 B
Plaintext
Executable File
29 lines
544 B
Plaintext
Executable File
step += 1;
|
|
if step > 4
|
|
{
|
|
if distance_to_object(obj_player_control) < 250
|
|
{
|
|
step = 0
|
|
ID = instance_create(x,y,obj_enemy_beams);
|
|
with (ID) motion_set(other.direction-5+random(10),10);
|
|
}
|
|
}
|
|
|
|
if hp < 1
|
|
{
|
|
score += 500;
|
|
instance_destroy();
|
|
}
|
|
|
|
if point_direction(x,y,obj_player_control.x,obj_player_control.y) > direction
|
|
{
|
|
direction += 5;
|
|
}
|
|
if point_direction(x,y,obj_player_control.x,obj_player_control.y) < direction
|
|
{
|
|
direction -= 5;
|
|
}
|
|
speed = 6;
|
|
|
|
|