Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Give item Script

Page: 1 of 1
 ExiledFish
05-13-2007, 4:42 PM
#1
I need help what Script would I need so that after following a certain path you get given a couple of items?
 Master Zionosis
05-13-2007, 5:34 PM
#2
You can attach this script to a line in a .dlg that will fire when that line is spoken:

void main()
{
object me = GetFirstPC();
CreateItemOnObject("YOUR_ITEM_NAME", me);
CreateItemOnObject("YOUR_ITEM_NAME", me);
CreateItemOnObject("YOUR_ITEM_NAME", me);
CreateItemOnObject("YOUR_ITEM_NAME", me);
}

Replace "YOUR_ITEM_NAME" with your item's name's of the .UTI file's.

As far as I am aware there isn't a way to have items given to you at a certain point in game, it has to be attached to a .dlg or some other means to activate it.
 stoffe
05-13-2007, 7:56 PM
#3
Replace "YOUR_ITEM_TAG" with your item's Tag's in their .UTI file's.

As far as I am aware there isn't a way to have items given to you at a certain point in game, it has to be attached to a .dlg or some other means to activate it.

You don't specify the tag in the CreateItemOnObject() function parameter, you specify the name of the UTI file (without the .uti extension). They are often set to the same, but doesn't necessarily have to be.

As for giving items at certain points you can accomplish that by modifying existing scripts in the game that run during that point. Though that should be avoided if possible since it will make it a lot harder to make the mod compatible with other mods. :)
 Master Zionosis
05-13-2007, 11:04 PM
#4
You don't specify the tag in the CreateItemOnObject() function parameter, you specify the name of the UTI file (without the .uti extension). They are often set to the same, but doesn't necessarily have to be.

Whoops, thats what i meant, it was pretty late in the night when i posted that, I'll correct it.
 ExiledFish
05-14-2007, 2:10 AM
#5
thnk you
Page: 1 of 1