Is ther a way to access a dropped object?

Post » Thu Jun 21, 2012 3:30 pm

I'm trying to change the properties of an object after it has been dropped from the inventory. Since the object no longer seems to be an "object reference," I can't work out a way to make it a property for my script. Any thoughts?
User avatar
Ella Loapaga
 
Posts: 3376
Joined: Fri Mar 09, 2007 2:45 pm

Post » Thu Jun 21, 2012 2:40 am

There's a story manager event that fires when an object is dropped. You could use that to launch a quest, and thus run a script.
User avatar
Kelly Osbourne Kelly
 
Posts: 3426
Joined: Sun Nov 05, 2006 6:56 pm

Post » Thu Jun 21, 2012 9:38 am

Are you using http://www.creationkit.com/OnItemRemoved_-_ObjectReference?

I think you'd need to check for the akBaseItem instead of the akObjectReference.

Or what DocClox said. It sounds like a sound plan.
User avatar
marie breen
 
Posts: 3388
Joined: Thu Aug 03, 2006 4:50 am

Post » Thu Jun 21, 2012 2:44 am

Thank you, for you responses, akBaseitem was what I was looking for. Teaching myself Papyrus with the tutorials, and grasping concepts slowly :)
User avatar
Soph
 
Posts: 3499
Joined: Fri Oct 13, 2006 8:24 am

Post » Thu Jun 21, 2012 4:31 pm

Are you using http://www.creationkit.com/OnItemRemoved_-_ObjectReference?

I think you'd need to check for the akBaseItem instead of the akObjectReference.

Or what DocClox said. It sounds like a sound plan.

Checking akObjectReference is safe as long you as you make your object persistent. Assuming you know the object before dropping it you can make it persistent. Eg: if you have it in a quest alias it won't be enough to have it persistent i believe, but if you have it you can put an registedForUpdate on it anytime then unregisterForUpdate from onItemRemoved where you also do your stuff.
Bottom line if akObjectReference is not None, and won't be if persistent, you can safely use it.
User avatar
Jordyn Youngman
 
Posts: 3396
Joined: Thu Mar 01, 2007 7:54 am


Return to V - Skyrim