ludum-dare-22/objects/obj_bees/Step_0.gml

19 lines
370 B
Plaintext

if active = 1
{
move_towards_point(obj_player.x,obj_player.y,10)
var hit = instance_nearest(x,y,obj_card)
if distance_to_object(hit) < 5
{
life -= 1
with (hit)
instance_destroy()
if life < 1
{
instance_destroy()
}
}
}
if ( scr_outside_circle() ) {
instance_destroy();
}