title: How to remove or get the position of a certain node in SpriteKit?
body: <p>I have a sprite kit game for Mac where I have multiple sprite nodes moving across the screen. How do I make it so I can <code>removeFromParent</code> a certain node?
  For example, I have a loop that periodically adds a new node every second:</p>
  
  <pre><code>-(void)spawnNew {
  xPos = 100;
  yPos = 1000;
  CGPoint location = CGPointMake(xPos, yPos);
  orb = [SKSpriteNode spriteNodeWithImageNamed:@"orb"];
  orb.position = location;
  orb.scale = 0.3;
  orb.name = @"orbSprite";
  CGFloat dirX = 0;
  CGFloat dirY = -30;
  CGVector vector1 = CGVectorMake(dirX, dirY);
  SKAction *action = [SKAction moveBy:vector1 duration:0.1];
  [orb runAction:[SKAction repeatAction:action count:100000]];
  [self addChild:orb];
  
  }
  </code></pre>
  
  <p>How would I make it so that I can get the position or remove certain orbs, not the entire group? For example, if the position of a sprite is equal to <code>x=100, y=200</code> then I would remove it from parent. Currently if I try to do this and check for an orb's position, it just checks the position of the newest orb to be added, not all of them which I would want.</p>
  
  <p>Thanks, any help would be appreciated.</p>