ShowBarterMenu - Actor

From the CreationKit Wiki
Jump to navigation Jump to search

Member of: Actor Script

Shows the barter menu for this actor.


Syntax[edit | edit source]

Function ShowBarterMenu() native

Parameters[edit | edit source]

None.

Return Value[edit | edit source]

None.

Examples[edit | edit source]

  • Standard use.
BobREF.ShowBarterMenu() ; Shows BobREF's barter menu
  • Prompt a barter menu via an activator.
ScriptName YourActivatorScript Extends ObjectReference  
 
Actor Property kSomeActor Auto ; Filled with desired merchant Actor
 
Event OnActivate(ObjectReference akActionRef)
	If akActionRef == Game.GetPlayer() ; Only if activated by the player
		kSomeActor.ShowBarterMenu() ; Show this actor's barter menu
	EndIf
EndEvent

Notes[edit | edit source]

  • This function will fail if the actor isn't actually loaded. The barter menu will appear, but it will be empty even if the actor's merchant chest has items in it.
  • The function will also fail and show an empty barter menu if the conditions aren't met for the actor's merchant faction to sell, e.g. she's not near the reference she needs to be.

See Also[edit | edit source]