Aller au contenu

Photo

Get Tag of Item in Object's Inventory


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Buddywarrior

Buddywarrior
  • Members
  • 256 messages

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);
 

 


#2
Buddywarrior

Buddywarrior
  • Members
  • 256 messages

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



#3
BelowTheBelt

BelowTheBelt
  • Members
  • 394 messages
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?