Jump to content

Does OnSell not work?


unuroboros

Recommended Posts

Tried Google and forum search on this, was surprised at lack of results...

 

My problem is I can't get OnSell to fire... at all. I have it set up on a MiscObject (whose other events fire reliably) and it contains a single Debug.MessageBox, that never shows up, while or after in the barter menu.

 

Has anyone got experience with this event and perhaps its idiosyncrasies? I'd just like to be able to detect when something is sold, without resorting to some hacky trick like checking distance in OnContainerChanged. :\

 

Link to comment
Share on other sites

For posterity's sake, I worked around this problem (which really sniffs of bug to me) using... SKSE.

 

Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)

	if (!akDestContainer)
		; Dropped...

	elseIf (UI.IsMenuOpen("BarterMenu"))
		; Selling...

	else
		; Stashing in a container...
	endIf

EndEvent

 

 

I used an OnItemRemoved event because, oh my god is OnContainerChanged useless for this kind of thing. (It's hooked up to a player reference alias in a quest.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...