Jump to content

Purchasing Items through dialogue.


Thicketford

Recommended Posts

I've created a new item in my mod that I want to be purchasable through dialogue. It's a crop that you can only acquire from farmers.

 

I've created a quest and set it up so that the dialogue only appears on characters in the 'FavourJobsGatherWheat' faction. The dialogue works perfectly, but the item isn't added to my inventory. I've added this script to the topic info...

 

 

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
Scriptname VFPurchaseSoyScript extends TopicInfo

MiscObject Property Gold Auto
Potion Property Soy Auto

;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
Game.getplayer().AddItem(Soy, 1)
Game.getplayer().RemoveItem(Gold, 5)
;END CODE

EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment

 

I've defined my properties correctly and the 'Has Result Script' column under the topic window doesn't have a 'Y'.

Any help would be greatly appreciated.

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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