cotoli Posted November 16, 2014 Share Posted November 16, 2014 (edited) HI all im trying to do a very simple script attached to a spell but im a noob with papyrus. I know how to create the magic effect, the spell, etc... but the script is maddening me.The spell is meant to open the targeted npc inventory, equipped items included: Scriptname shownpcinventory extends activemagiceffect Event OnEffectStart(Actor akTarget) OpenInventory() EndEvent Function OpenInventory(bool abForceOpen = true) native xxxxxx Endfunction Where it says xxxxxx i tried everything but the script never compiles. I feel so stupid. I know that it has to be something about the function not belonging to an activemagiceffect. But i cant solve it... any help would be so much appreciated! Edited November 16, 2014 by cotoli Link to comment Share on other sites More sharing options...
Mattiewagg Posted November 16, 2014 Share Posted November 16, 2014 what are you trying to do? Whose inventory are you attempting to open? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 16, 2014 Share Posted November 16, 2014 Scriptname shownpcinventory extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCastor) akTarget.OpenInventory(true) EndEvent The NPC whose inventory you want to see needs to be the one to actually call the function. If you want to open the inventory of non-teammate NPCs then include the "true" as I have it above. Otherwise, remove it and the spell will only work on followers. Link to comment Share on other sites More sharing options...
cotoli Posted November 16, 2014 Author Share Posted November 16, 2014 (edited) @Matthiaswagg sorry, i forgot to mention that(edited now): the spell is meant to open the targeted npc inventory, equipped items included Edited November 16, 2014 by cotoli Link to comment Share on other sites More sharing options...
cotoli Posted November 16, 2014 Author Share Posted November 16, 2014 (edited) @IsharaMeradin thank you, that partially works! I now see how simple it was... the problem is that it shows everything BUT equipped armor. The only equipped items it shows are weapons. But im a bit closer now XD Edited November 16, 2014 by cotoli Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 16, 2014 Share Posted November 16, 2014 Well, if the equipped armor is their default outfit, it won't show up in the inventory. So that is to be expected. Link to comment Share on other sites More sharing options...
cotoli Posted November 16, 2014 Author Share Posted November 16, 2014 thats bad news... but i know a mod who actually does it, i have no idea how. i´ve been peeking the scripts but its totally beyond my knowledge... Link to comment Share on other sites More sharing options...
cotoli Posted November 18, 2014 Author Share Posted November 18, 2014 figured it out, turned to be that adding a new perk is way more easier. Link to comment Share on other sites More sharing options...
firepower02 Posted November 18, 2014 Share Posted November 18, 2014 Scriptname shownpcinventory extends activemagiceffect Event OnEffectStart(Actor akTarget, Actor akCastor) akTarget.OpenInventory(true) EndEvent The NPC whose inventory you want to see needs to be the one to actually call the function. If you want to open the inventory of non-teammate NPCs then include the "true" as I have it above. Otherwise, remove it and the spell will only work on followers. Hey thanks! I used the OpenInventory() script, but it never worked for me until now. I never thought of adding (true), I just thought something else was the problem. Link to comment Share on other sites More sharing options...
Recommended Posts