Jump to content

Scripting help - equipitem from leveled list


SAC

Recommended Posts

Posted

I managed to get a script add an item from a leveled list to an NPC. However, I am unable to make the NPC equip the said item - the item gets added to their inventory, however it is not equipped.

 

Not sure how to solve this

LeveledItem Property NooseOutfit Auto      ; it exists, it is populated

<..>

target.additem(NooseOutfit)        ; this works fine, an item is added
target.equipitem(NooseOutfit)      ; this does nothing

I suppose additem should return a reference that I can use for equipitem. Sadly, it does not return any reference, by design.

 

Thanks!

Posted

I managed to get a script add an item from a leveled list to an NPC. However, I am unable to make the NPC equip the said item - the item gets added to their inventory, however it is not equipped.

 

Not sure how to solve this

LeveledItem Property NooseOutfit Auto      ; it exists, it is populated

<..>

target.additem(NooseOutfit)        ; this works fine, an item is added
target.equipitem(NooseOutfit)      ; this does nothing

I suppose additem should return a reference that I can use for equipitem. Sadly, it does not return any reference, by design.

 

Thanks!

 

I'm not a programmer, but try something other than "target" once they have the item.

 

;)

 

 

Posted

Actually, the problem seems to be that:

 

- additem adds one of the LL outfits, but the script doesn't know which one, because additem does not return a reference

- equipitem adds the id of the LL itself, but that is not an equipable item

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...