title: selecting an inventory item
body: <pre><code>/// Drag Icon
  visible = oInventoryBox.visible;
  
  if(position_meeting(mouse_x,mouse_y,oInventoryIconParent)){
      if(mouse_check_button_pressed(mb_left)){ // grab the item //
          global.heldIcon = id;
      }
  }
  
  if(global.heldIcon == id){
  box = instance_nearest(mouse_x,mouse_y,oInventoryBox);
  if(mouse_check_button(mb_left)){ // drag the item //
      x = mouse_x;
      y = mouse_y;
  }
  if(mouse_check_button_released(mb_left)){ // release the item //
      if(instance_exists(box)){
          global.boxes[boxNumber].item = box.item; // give the old box the new boxes item
          global.boxes[boxNumber].item.boxNumber = boxNumber;// give the new boxes item it's new box number
          box.item = id;                           // put the item in the new box
          boxNumber = box.boxID;                             // give this item it's new box number
      }
      box = -1; // reset box and the item being dragged.
      global.heldIcon = -1;
  }
  }
  </code></pre>
  
  <p><a href="http://webmshare.com/WNdZd" rel="nofollow">http://webmshare.com/WNdZd</a> alright so my inventory is buggered. as you can see by the video, it seems to only grab this one seed and ignores everything else.  If someone see what the problem that would be beauty.</p>
  
  <p>also when it appears that I'm grabbing different seeds in the video, it's actually just me double clicking to switch the spot of the original seed.</p>
  
  <p>I think the problem is with 'id' I'm not sure if it's actually referencing the object or if its just some random number. the docs didn't really explain it well, tried it with 'self' but that that returns -1 causing it to drag every item.</p>