Jump to content

[F:NV MOD HELP] Shopping Terminal Script Error


Deleted29076120User

Recommended Posts

Hey there! I am very, VERY new to GECK modding of Fallout: New Vegas, and I am trying to get a terminal to give the player a nuka-cola, and charge five caps, and if the player doesn't have enough caps, and error message is displayed.

 

I have the main terminal which call the shop terminal itself, and it works fine in-game, except when I click on the option to purchase a nuka-cola, and nothing happens.

 

The script I am using:

 

If (Player.GetItemCount 0000000f >= 5)
Player.AddItem 0001519e 1
Player.RemoveItem 0000000f 5
Else
showmessage shoperror
End If

 

Images of the windows in the spoiler.

 

 

 

 

http://i.imgur.com/vUFtK2T.png

 

http://i.imgur.com/IYiSGkx.png

 

 

 

 

If anyone could help, that would be great!

 

Thanks!

Link to comment
Share on other sites

Maybe try with the script like this. The GECK prefers that you use the regular IDs (with words) of items instead of the base IDs.

If Player.GetItemCount Caps001 >= 5
 Player.RemoveItem Caps001 5
 Player.AddItem NukaCola 1
  Else
showmessage shoperror
EndIf
End

Although I would find it easier to have two options to buy in the terminal, and condition them directly with GetItemCount pointing to the player. That way you can make it so the option to buy will only appear if the player has enough caps. You may be able to find more info about this online, but if you can't figure it out, let me know and I can take some pictures in the GECK. I'm too tired right now, sorry.

Link to comment
Share on other sites

Maybe try with the script like this. The GECK prefers that you use the regular IDs (with words) of items instead of the base IDs.

If Player.GetItemCount Caps001 >= 5
 Player.RemoveItem Caps001 5
 Player.AddItem NukaCola 1
  Else
showmessage shoperror
EndIf
End

Although I would find it easier to have two options to buy in the terminal, and condition them directly with GetItemCount pointing to the player. That way you can make it so the option to buy will only appear if the player has enough caps. You may be able to find more info about this online, but if you can't figure it out, let me know and I can take some pictures in the GECK. I'm too tired right now, sorry.

 

Alright, I will try your script as soon as I can. I would love to see some screenshots of yours. I like your option to remove the item if you have insufficient caps, but could there be a way to keep the item in the list, but grey it out, and make it unclickable?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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