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.

my merchant script wont work

Page: 1 of 1
 Canderis
08-04-2008, 2:30 PM
#1
my script wont work please tell me why


// ST: st_startstore.nss

void main() {
object oStore = GetObjectByTag("mandomerch001");
object oSpeaker = GetPCSpeaker();

if (!GetIsObjectValid(oStore))
oStore = CreateObject(OBJECT_TYPE_STORE, "mandomerch001", GetLocation(OBJECT_SELF));

if (GetIsObjectValid(oStore))
DelayCommand(0.5, OpenStore(oStore, oSpeaker));
}
i followd the merchant tut
 EnderWiggin
08-04-2008, 2:33 PM
#2


void main() {
object oStore = GetObjectByTag("SHOP_TAG_HERE");
object oSpeaker = GetPCSpeaker();

if (!GetIsObjectValid(oStore))
oStore = CreateObject(OBJECT_TYPE_STORE, "SHOP_TAG_HERE", GetLocation(OBJECT_SELF));

if (GetIsObjectValid(oStore))
DelayCommand(0.5, OpenStore(oStore, oSpeaker));
}

That's the right script, it seems. I think that your tag must be wrong. If you're unsure what your tag is, post a screenshot of the file.

_EW_
 Canderis
08-04-2008, 2:46 PM
#3
i know what the tag is but tag of...?
 EnderWiggin
08-04-2008, 2:49 PM
#4
i know what the tag is but tag of...?

The *.utm file of your store.

_EW_
 Canderis
08-04-2008, 2:51 PM
#5
thats what i had but the script wouldent fire
 EnderWiggin
08-04-2008, 2:57 PM
#6
Are you sure? Can you post a screenshot of the tag?

The script isn't the problem. Are you compiling the script? Are you putting the script in your override? Are you attaching the script to a dialog?

_EW_
 Istorian
08-04-2008, 3:01 PM
#7
Canderis, you probably haven't attached the script to a dialogue node.

Oh, and I have to say one thing to you: Now that EW is dealing with your problem, it will be solved, no matter what...Way to go, EW;)

|I|
 Canderis
08-04-2008, 3:27 PM
#8
its attached to the dialog the tag is right
dlg file
http://i313.photobucket.com/albums/ll378/canderis/helphelphelp.jpg)
 Istorian
08-04-2008, 4:13 PM
#9
Well, your script is named "st_startstore", and in the dialogue you have "st_startstore001". That's why the store doesn't open;)

|I|
 Canderis
08-04-2008, 4:16 PM
#10
i never posted the name did i?
 Istorian
08-04-2008, 4:17 PM
#11
I saw the name from your script in the first post!:xp:

|I|
 Canderis
08-04-2008, 4:19 PM
#12
well ill try renaming it do i put it in the override or in the .mod file?
 EnderWiggin
08-04-2008, 4:20 PM
#13
No, you didn't. But that's what the stoffe named her script, which is the script you are using.

And try putting it in a blank node (like make a new struct spoken by the NPC, leave it blank, and then put the script there.)

I'm not sure if that will work, but I know it's something that I always abide by.

_EW_
 Canderis
08-04-2008, 4:23 PM
#14
well do i put the script in override or in the .mod file??
 Istorian
08-04-2008, 4:31 PM
#15
.mod file....

|I|
 EnderWiggin
08-04-2008, 5:27 PM
#16
That depends. If you have a mod file, then yes, it goes in your mod file. Pack everything in there and try again.

_EW_
Page: 1 of 1