Author Topic: Get Tag of Item in Object's Inventory  (Read 307 times)

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Get Tag of Item in Object's Inventory
« on: May 19, 2014, 11:38:17 pm »


               

Don't know why this is being stubborn. Seams like it would be fairly direct, what am I doing wrong? 


 



object oItem = GetNextItemInInventory(OBJECT_SELF);
string oItemTag = GetTag(oItem);
 
DelayCommand(0.5, SetLocalString(OBJECT_SELF,"ITEMTAG",oItemTag));
 
ActionSpeakString("the tag is " + oItemTag);
 

 

               
               

               
            

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Get Tag of Item in Object's Inventory
« Reply #1 on: May 19, 2014, 11:41:36 pm »


               

Ooh flippermonkies.. It's GetFirstItemInInventory...bugger..Mods feel free to delete post.. 



               
               

               
            

Legacy_BelowTheBelt

  • Hero Member
  • *****
  • Posts: 699
  • Karma: +0/-0
Get Tag of Item in Object's Inventory
« Reply #2 on: May 19, 2014, 11:49:41 pm »


               What is the effect you are seeing?


Something to consider:


In order for ActionSpeakString to work, Object_Self needs to be the type of object that can hold an action queue.  


Have you confirmed that the object that is calling the script (the object holding the inventory) has an action queue?