function CreateTinyEnemy(x, y, radius, type){
  let ref = ObjEnemy_Create(OBJ_ENEMY);
  ObjEnemy_Regist(ref); setpos(ref, x, y);
  renderTinyGoreF(ref, type); enemyHitbox(ref, radius[1]);
  ObjRender_SetScaleXYZ(ref, radius[0], radius[0], 0);

  return ref;
}

task enemyHitbox(enemy, radius){
  loop{
    if(Obj_IsDeleted(enemy)){break;}

    if(!getvalue(enemy, "invincibilty", false)){
      ObjEnemy_SetIntersectionCircleToShot(enemy, ObjMove_GetX(enemy), ObjMove_GetY(enemy), radius); 
      ObjEnemy_SetIntersectionCircleToPlayer(enemy, ObjMove_GetX(enemy), ObjMove_GetY(enemy), radius);
    }

		yield;
	}
}