demidekidasu Posted December 3, 2012 Share Posted December 3, 2012 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 More sharing options...
demidekidasu Posted December 3, 2012 Author Share Posted December 3, 2012 (edited) 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 December 3, 2012 by demidekidasu Link to comment Share on other sites More sharing options...
Ghaunadaur Posted December 3, 2012 Share Posted December 3, 2012 You can make this shorter: EVENT OnActivate(ObjectReference akActionRef) (akactionref as Actor).UnequipAll() endEVENT Link to comment Share on other sites More sharing options...
demidekidasu Posted December 3, 2012 Author Share Posted December 3, 2012 Ah yes, of course, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts