Phoenixia1177 Posted June 10, 2016 Share Posted June 10, 2016 I was testing why something wouldn't work and determined that OnItemAdded wasn't firing. So, I made a very simple script and attached it to the player usin a reference alias with a quest to attach: Scriptname playerTestSCRIPT extends ReferenceAlias Message Property GateLocked auto Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) GateLocked.Show() endEvent The message never shows, no matter what I pick up or how long I wait. So, assuming maybe I screwed something up with the alias part, I attached: Scriptname playerBadIdeaTestSCRIPT extends Actor Message Property GateLocked Auto Event OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) GateLocked.Show() endEvent Directly to the player in a fresh esp with nothing else. It still never does anything. I'm assuming that I'm doing something dumb (I'm not new to coding, just to Papyrus). Ultimately, I need the game to check whenever an item is added to the player's inventory, then do something if it is an item with a certain keyword - everything in that larger script seemed perfectly fine, it just never seemed to run. At any rate, thank you for any help, this has been frustrating me all night. Link to comment Share on other sites More sharing options...
viennacalling Posted June 10, 2016 Share Posted June 10, 2016 OnItemAdded - ObjectReferencehttp://www.creationkit.com/fallout4/index.php?title=OnItemAdded_-_ObjectReference You must use AddInventoryEventFilter to receive this event, letting it know what items you care about. AddInventoryEventFilter - ScriptObjecthttp://www.creationkit.com/fallout4/index.php?title=AddInventoryEventFilter_-_ScriptObject OnItemAdded/Removed will not be sent to any container scripts not having filters. Link to comment Share on other sites More sharing options...
Phoenixia1177 Posted June 10, 2016 Author Share Posted June 10, 2016 Thank you! I kept looking at the Skyrim page (I didn't know they put up the FO4 ones yet). Again, thank you, this made my night:-) Link to comment Share on other sites More sharing options...
Recommended Posts