hereticus Posted January 20, 2011 Share Posted January 20, 2011 (edited) Hello everybody ! I have an issue with a script that don't return "1" when searching an armor in a list ... I first create a list with the item outfitmerc01 (hereticuslist) An object , when added to an npc inventory do this : scn nonworkingscript ref contidref armor begin onadd set contid to getcontainer ;catch the npc id that have the object set armor to contid.getequippedobject 2 ; catch the id of the npc armor (NVSE function) if armor.isinlist hereticuslist ; show the message "test" if the armor is in the listshowmessage testendifend But it don't work at all :( , and when i change the "showmessage test" by "additem (something)" ... kill contid ... or wathever ... it don't work ... :( BUT , if i do this : if armor == outfitmerc01showmessage testendif It work , but the list of armors is realy long so the code is not optimized and it's more difficult for me to manage it with the entire code ... a list with all armors is realy better ! Thanks in advance , Hereticus Edited January 20, 2011 by hereticus Link to comment Share on other sites More sharing options...
davidlallen Posted January 20, 2011 Share Posted January 20, 2011 This seems like a slightly complicated approach. If I understand, you want to do something when any actor picks up this item, while also wearing any armor which is mentioned in your formlist. Getcontainer will give you the ref of the actor. Then it seems that you can use "if ref.getequipped myarmorlist". Link to comment Share on other sites More sharing options...
hereticus Posted January 21, 2011 Author Share Posted January 21, 2011 This seems like a slightly complicated approach. If I understand, you want to do something when any actor picks up this item, while also wearing any armor which is mentioned in your formlist. Getcontainer will give you the ref of the actor. Then it seems that you can use "if ref.getequipped myarmorlist". Thank you , i'll try it this evening :P I also responded on the bethsoft forums duplicate thread : http://forums.bethsoft.com/index.php?/topic/1160419-search-an-armor-in-a-list-in-a-geck-script/ Link to comment Share on other sites More sharing options...
Recommended Posts