OnDrop Event - Does it exist?

Post » Tue Jun 19, 2012 12:33 am

I am trying to trigger a script attached to a Misc Item with an OnDrop event. However, there is no documentation of such an event in Papyrus.
Event OnDrop()	 debug.notification("You dropped me!")endEvent
User avatar
phillip crookes
 
Posts: 3420
Joined: Wed Jun 27, 2007 1:39 pm

Post » Tue Jun 19, 2012 12:48 am

Perhaps this: http://www.creationkit.com/OnItemRemoved_-_ObjectReference
User avatar
Jose ordaz
 
Posts: 3552
Joined: Mon Aug 27, 2007 10:14 pm

Post » Mon Jun 18, 2012 6:55 pm

There is also an event called OnContainerChanged.
User avatar
Vickytoria Vasquez
 
Posts: 3456
Joined: Thu Aug 31, 2006 7:06 pm

Post » Mon Jun 18, 2012 4:40 pm

I don't have the CK open, but perhaps

Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)if akOldContainer == Game.GetPlayer() && !akNewContainer  Debug.MessageBox("You just dropped me!")endifEndEvent
User avatar
JD bernal
 
Posts: 3450
Joined: Sun Sep 02, 2007 8:10 am

Post » Mon Jun 18, 2012 7:16 pm

Would there be a way to have the next time the item is spawned activate the effect?

Or maybe have an item that will always perform the function and switch it out?
User avatar
Shianne Donato
 
Posts: 3422
Joined: Sat Aug 11, 2007 5:55 am

Post » Tue Jun 19, 2012 2:50 am

Thanks for the help guys. I am going to try the OnContainerChanged example.
User avatar
Joey Bel
 
Posts: 3487
Joined: Sun Jan 07, 2007 9:44 am

Post » Mon Jun 18, 2012 9:55 pm

There is also the OnRelease event in ObjectReference, that triggers when the object you're grabbing is dropped, not sure if it's what you meant by Dropped though.
User avatar
Taylor Tifany
 
Posts: 3555
Joined: Sun Jun 25, 2006 7:22 am

Post » Mon Jun 18, 2012 7:20 pm

By dropped I mean, removed from the player's inventory and dropped into the world as a World Object.
User avatar
Lauren Denman
 
Posts: 3382
Joined: Fri Jun 16, 2006 10:29 am

Post » Mon Jun 18, 2012 3:01 pm

Then OnContainerChanged() is what you're after. It's actually infinitely more useful than OnDrop ever was.
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm


Return to V - Skyrim