@ txesmi
So you placed the inv_get_floating_icon_item_id() function into inventory.c , and called on this function from the main function in OrcStronghold.c ?

So far, I placed the inv_get_floating_icon_item_id() function into inventory.c , as shown here:

Code:
var inv_get_floating_icon_item_id ()
{
	if ( !inv_floating_flag  )
		return -1;
	inv_floating_flag = 0;
	Item *item = global_floating_item_ptr->item;
	global_floating_item_ptr->item = NULL;		
   bmap_remove(global_floating_item_ptr->floating_item_panel->bmap);
   pan_remove(global_floating_item_ptr->floating_item_panel);
   
	return item->id;
}



...and placed this code into the main function of OrcStronghold.c :

Code:
if ( inv_is_floating() )
   { 
      var item_id = inv_get_floating_icon_item_id ();
      if(item_id == MACE_ID)
      {
          ent_create ( "RubensMedievalMace.mdl", vector(-72.355,-549.575,-47.624), mace_action); 
      }
   }



When I click on an item in the inventory bag, and drag that same item outside the inventory bag, and click again, the image of the item is not disappearing and being removed from the inventory bag. No matter how much I click and drag the item image outside the inventory bag, nothing is happening. The item image is still intact, and is not leaving the inventory bag.

Is the argument in the if statement placed in the main function correct in checking whether the player clicked an inventory item outside the inventory bag?

Last edited by Ruben; 01/12/14 11:17.