Jump to content

openinventory script


cotoli

Recommended Posts

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 by cotoli
Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

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