How to make the player to pay for something?

Post » Thu Jun 21, 2012 2:10 am

How to make so that the player pays specific price after a dialogue? Like after a line he got 50gold removed. Not to get reward but to get gold remove.
Thanks in advance!
User avatar
xxLindsAffec
 
Posts: 3604
Joined: Sun Jan 14, 2007 10:39 pm

Post » Wed Jun 20, 2012 8:44 pm

This should do the trick:

Form Property Gold Auto ; Assign to the Gold001 itemint Property Cost Auto ; How much does this cost?ObjectReference Property Seller Auto ; Who is selling this service?If Game.GetPlayer().GetItemCount(Gold) >= Cost    Game.GetPlayer().RemoveItem(Gold,Cost,false,Seller)    ; Do whatever was being paid for here.else    Debug.Notification("Not enough Gold!") ;(make the transaction fail)endif
User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm

Post » Wed Jun 20, 2012 5:01 pm

So I copy everything ?And also were to type how much you have to give? And thanks again !! :biggrin: (I am such a noob) :D
User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Wed Jun 20, 2012 9:55 pm

So I copy everything ?And also were to type how much you have to give? And thanks again !! :biggrin: (I am such a noob) :biggrin:

Set the amount in the property "cost".
User avatar
sara OMAR
 
Posts: 3451
Joined: Wed Jul 05, 2006 11:18 pm

Post » Thu Jun 21, 2012 4:25 am

Remember to set the properties. Gold is actually a MiscObject Property, not a form, sorry.
User avatar
Colton Idonthavealastna
 
Posts: 3337
Joined: Sun Sep 30, 2007 2:13 am

Post » Wed Jun 20, 2012 10:52 pm

So how do I fill the properties.
User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Wed Jun 20, 2012 8:01 pm

http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Introduction_to_Properties#Hooking_up_the_message_boxes_to_the_properties_in_the_script
User avatar
Kara Payne
 
Posts: 3415
Joined: Thu Oct 26, 2006 12:47 am

Post » Wed Jun 20, 2012 5:29 pm

I don't know what am I doing wrong but it isn't working.
User avatar
Marguerite Dabrin
 
Posts: 3546
Joined: Tue Mar 20, 2007 11:33 am

Post » Thu Jun 21, 2012 2:29 am

Can someone give me another script !! Please !
User avatar
Kayla Bee
 
Posts: 3349
Joined: Fri Aug 24, 2007 5:34 pm


Return to V - Skyrim