getInventoryObject like command?

Post » Fri Nov 16, 2012 5:43 pm

Does anybody know of a command that has the same as the getInventoryObject command for OBSE in oblivion? I don't think there is, but I thought hey might as well ask before I start annoying the poor devs of SKSE ;P
User avatar
Julie Ann
 
Posts: 3383
Joined: Thu Aug 23, 2007 5:17 am

Post » Fri Nov 16, 2012 6:50 pm

Wow, sorry about the completely useless post. If I would have done a bit more reading around I would have figured this out before now and without an extra post. Ah well, maybe it'll be useful to somebody else. Although I still would like to be able to get the base objects Editor ID instead of a general name as that would give me a bit more control over manipulation of items.

Okay, so I was able to get the desired effect by using the SKSE functions GetNthForm and GetName.

The syntax I used was something like this.

InventoryItem = ObjectRef.GetNthForm(X).GetName()

X being the number of the item in the inventory of the container starting at 0. For instance if I used GetNthForm(2) it would return the reference of the 3rd item in the container. Also note that by the third item in the container I mean the third item added to the container if it was empty before hand. It does not parse in alphabetical order.
User avatar
JUDY FIGHTS
 
Posts: 3420
Joined: Fri Jun 23, 2006 4:25 am


Return to V - Skyrim