thegeekofalltrades Posted November 2, 2014 Share Posted November 2, 2014 I'm making a mod in which a script attached to a player quest alias needs to receive the OnItemAdded event. It doesn't. Like, at all: Scriptname MyQuestPlayerScript Extends ReferenceAlias MyQuestScript Property MyQuest Auto Event OnInit() Debug.Notification("The player script is initialized.") EndEvent Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) Debug.Notification("OnItemAdded received.") EndEventThis script is attached to a quest alias force-filled with the player (Specific Reference: 'PlayerRef'). The MyQuestScript property is properly filled. When I start the game, I see the debug message from OnInit, suggesting that the script is there and it's properly initialized, but then I run around the room picking up items or I add items to the player with the console, and I never see the message from OnItemAdded. Previously, I had some actually useful logic in there, and it wasn't happening, either. The event just isn't being received, and I can't figure out why. Any thoughts? Link to comment Share on other sites More sharing options...
lofgren Posted November 2, 2014 Share Posted November 2, 2014 Can you share a screenshot of the alias window? Link to comment Share on other sites More sharing options...
thegeekofalltrades Posted November 2, 2014 Author Share Posted November 2, 2014 Can you share a screenshot of the alias window? QuickDropPlayerScript is the script in question. Its contents are as shown above, but with "QuickDrop" in the place of "MyQuest." Link to comment Share on other sites More sharing options...
lofgren Posted November 2, 2014 Share Posted November 2, 2014 Maybe try it without the MCM script attached? The other thing is that there is also an NPC called PlayerInventory. Maybe you need to point your alias to that NPC to get OnItemAdded events from the player? Just some things to try. I don't have the solution. Link to comment Share on other sites More sharing options...
thegeekofalltrades Posted November 2, 2014 Author Share Posted November 2, 2014 Neither options worked. Thanks for the thoughts, though. I made a completely new plugin and my script is receiving OnItemAdded again. Just a Beth Bug, I guess. It'll be kind of a pain to have to rebuild the plugin from scratch, but fortunately it's not a big mod. UPDATE: A-ha, problem diagnosed. My quest has several empty aliases on it, and I hadn't checked them as "Optional," which was apparently just ruining everything. Link to comment Share on other sites More sharing options...
Recommended Posts