Aller au contenu

Photo

Help Creating Script to add items to Inventory


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
shadow5973

shadow5973
  • Members
  • 48 messages
I was wondering if anyone had a sample script for adding items to your inventory upon module load?

#2
TimelordDC

TimelordDC
  • Members
  • 923 messages
Read through the scripts in this blog

#3
Proleric

Proleric
  • Members
  • 2 346 messages
If you're making a custom campaign, you may find this useful.

In a nutshell, in EVENT_TYPE_MODULE_START, you need something like this:

[dascript]
EquipItem(GetHero(), UT_AddItemToInventory(R"gen_im_arm_cht_lgt_rlr.uti"));
[/dascript]


with the correct .uti file name for the item you want.

Modifié par Proleric1, 17 novembre 2010 - 07:03 .


#4
shadow5973

shadow5973
  • Members
  • 48 messages
 @ Proleric1: I'm looking to inject items into the player's in ventory after a new game has been started in the main campaign.

@ TimeLordDC: Thanks that sould help out a lot.

Edit: Is there a way to add an item count to the script to add the items back in to the inventory (incase someone sells or deletes the items)?

Modifié par shadow5973, 30 novembre 2010 - 01:39 .