jazzisparis Posted September 10, 2014 Share Posted September 10, 2014 Try this: ref rCont ref rItem begin OnAdd set rCont to GetContainer set rItem to GetBaseObject end begin GameMode if rCont == 0 elseif rCont.GetEquipped rItem == 0 elseif rCont.GetHealthPercentage < 0.7 set rCont to 0 DropMe endif end GetSelf will not return a valid value when called by an inventory reference; GetEquipped expects a base object, and will otherwise break the script. Only use NVSE notation (let X :=, instead of set X to) with expressions referencing array/string variables - it needlessly adds another level of processing, and is therefore slower. Link to comment Share on other sites More sharing options...
Hemingway308 Posted September 10, 2014 Share Posted September 10, 2014 It's up to opinion, but personally I would suggest always using let rather than set except in obscure contexts when set works better. The difference in performance is negligible, and let allows much more powerful expressions with the added bonus that if it fails, it prints an error to the console naming the guilty script, rather than just silently boning it. Link to comment Share on other sites More sharing options...
bioshards Posted September 11, 2014 Author Share Posted September 11, 2014 after extensive testing, i have come to the conclusion that all the scripts suggested so far dont work on npcs that are already wearing the apearal when you enter the cell, it only works if you were there when they equipped it. Link to comment Share on other sites More sharing options...
bioshards Posted September 15, 2014 Author Share Posted September 15, 2014 pls someone respond Link to comment Share on other sites More sharing options...
bioshards Posted December 22, 2014 Author Share Posted December 22, 2014 self bumping because i really wanna finish this mod and nobody's responded in a long time Link to comment Share on other sites More sharing options...
Recommended Posts