Difference between revisions of "ShowBarterMenu - Actor"
Jump to navigation
Jump to search
imported>Henning m |
imported>VampireMonkey |
||
Line 23: | Line 23: | ||
</source> | </source> | ||
== Usage Example == | |||
Remember the Commissary terminals from Fallout New Vegas: Lonesome Road | |||
well i manage to figure out how to implement this into skyrim. | |||
Here's the script: | |||
<source lang="papyrus"> | |||
Scriptname YourScriptName extends ObjectReference | |||
Actor property ThisActor Auto | |||
;this is where you point it to the merchant actor you have already made. | |||
Function ShowBarterMenu() native | |||
event onActivate(objectReference activateRef) | |||
if activateRef == game.getPlayer() | |||
;if the activator is activated by the player. | |||
Thisactor.ShowBarterMenu() | |||
;then show this actors barter menu. | |||
EndIf | |||
EndEvent | |||
</source> | |||
This script has to be placed on an activator for it to work. | |||
i recommend to add in the "DweButtonScript" script along this one and then pick a sound, | |||
so when you activate it you get a sound along, like a beep or a evil laughter for example. | |||
VampireMonkey out. | |||
== See Also == | == See Also == | ||
*[[Actor Script]] | *[[Actor Script]] |
Revision as of 11:06, 10 December 2012
Member of: Actor Script
Shows the barter menu for this actor.
Syntax
Function ShowBarterMenu() native
Parameters
None.
Return Value
None.
Examples
; Shows the barter menu for Bob
Bob.ShowBarterMenu()
Usage Example
Remember the Commissary terminals from Fallout New Vegas: Lonesome Road well i manage to figure out how to implement this into skyrim.
Here's the script:
Scriptname YourScriptName extends ObjectReference
Actor property ThisActor Auto
;this is where you point it to the merchant actor you have already made.
Function ShowBarterMenu() native
event onActivate(objectReference activateRef)
if activateRef == game.getPlayer()
;if the activator is activated by the player.
Thisactor.ShowBarterMenu()
;then show this actors barter menu.
EndIf
EndEvent
This script has to be placed on an activator for it to work. i recommend to add in the "DweButtonScript" script along this one and then pick a sound, so when you activate it you get a sound along, like a beep or a evil laughter for example. VampireMonkey out.