Jump to content

TheGodfoster5

Premium Member
  • Posts

    2
  • Joined

  • Last visited

Nexus Mods Profile

About TheGodfoster5

TheGodfoster5's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. @Pellape Thanks for the reply! Wouldn't this line below from my script initialize my array? I'm assigning it the value of a command like the 3rd method you mentioned. Let aCaravan := MojaveOutpostCaravaneerREF.GetAllItemRefs 0 0 0 1 3. Assigning it the return value of a command returning an array such as GetItems. Let MyArray := GetItems
  2. Hi Everyone, Relatively new modder here, but I'm currently working on a mod that allows the player to operate a caravan. It would basically work like this: the player would give anything that they want to sell to a specific NPC, that NPC would then disappear and then reappear in a given number of days with their total inventory value converted to caps. I'm currently trying to get the basics of the script working, but so far I'm having no luck. If someone can tell me where I'm going wrong with the below script, I would appreciate it! scn AACaravan1Script array_var aCaravan short iCaravanStatus int iIndex int iCaravanValue int iItemValue ref rItem Begin Gamemode if iCaravanStatus == 1 Let aCaravan := MojaveOutpostCaravaneerREF.GetAllItemRefs 0 0 0 1 let iIndex := ar_size aCaravan while (iIndex -= 1) >= 0 let rItem := aCaravan[iIndex] let iItemValue := rItem.GetItemValue let iCaravanValue += iItemValue MojaveOutpostCaravaneerREF.RemoveItem rItem 1 loop endif player.additem caps001 iCaravanValue set iCaravanStatus to 0 set iCaravanValue to 0 MojaveOutpostCaravaneerREF.enable End Once I get this working, I'm planning on adding a delay of a few in-game days, and the caps will be added to a container to be collected by the player manually. Thanks in advance for anyone's help!
×
×
  • Create New...