Jump to content

Papyrus UnequipAll() Help Needed


Recommended Posts

Hi everyone,

 

I'm getting ready to tear my hair out again due to Papyrus, and the unhelpful Wiki.

 

What I am trying to do is make an activator that unequips everything from whoever activates it. Not limited to "Game.getplayer" in other words.

 

Here is what I have been trying:

EVENT OnActivate(ObjectReference akActionRef)

akactionref.UnequipAll()

endEVENT

 

It fails to compile with the following error -

UnequipAll is not a function or does not exist

 

I suspect the problem lies with trying to send it to "akactionref", but I don't know how to send it to the "akactionref" correctly and I cannot find out how.

Link to comment
Share on other sites

Got it compiling. Apparently you need to do it like this:

 

EVENT OnActivate(ObjectReference akActionRef)

ObjectReference User = akActionRef
(User as Actor).UnequipAll()

endEVENT

 

Not tested in-game yet though...

 

-EDIT-

Tested, seems to do exactly what it says on the tin :)

Edited by demidekidasu
Link to comment
Share on other sites

  • Recently Browsing   0 members

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