needsaname Posted July 14, 2012 Share Posted July 14, 2012 (edited) Part of my mod requires the player to pick up a skull and get a power from it, but for some reason it isn't working, Can anyone help? Here's the script: MiscObject Property Skull Auto Spell Property LesserSkull auto Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) if (akBaseItem == Skull) if (Game.GetPlayer().GetItemCount(Skull) == 1) game.getplayer().addspell(LesserSkull) endIf endif endevent Edited July 14, 2012 by needsaname Link to comment Share on other sites More sharing options...
gasti89 Posted July 14, 2012 Share Posted July 14, 2012 Where are you putting this script? This event is for the reference TAKING the object, so if you put it on the object it won't work. For your purpose i think it's better to use a OnContainerChanged Event and put the the script on the skull itself. Link to comment Share on other sites More sharing options...
needsaname Posted July 14, 2012 Author Share Posted July 14, 2012 Hmm yea, I was putting it on the skull, I'll try out your method and see what happens. Link to comment Share on other sites More sharing options...
needsaname Posted July 14, 2012 Author Share Posted July 14, 2012 Ok, that worked! Thanks for the help!Here's what I did with the script if any1 wants to know: MiscObject Property Skull Auto Spell Property LesserSkull auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if (akNewContainer == Game.GetPlayer()) if (Game.GetPlayer().GetItemCount(Skull) == 1) game.getplayer().addspell(LesserSkull) endIf endif endevent Link to comment Share on other sites More sharing options...
Recommended Posts