Jump to content

Scripting Problem: Anyone know how to detect which merchant you are trading with ?


TheWanderer001

Recommended Posts

I'm trying to create a script which is on an item which will only allow it to be sold to selected merchants... and returned if it's not the right one.

OBSE is being used and I can walk through a list of the local NPC(Actor := GetHighActors; merchant := Actor[x] : within in the Begin OnSell ... End) but can't find the way to detect who they actually are in order to filter on the ones I want.

This is probably easy but I just haven't found it yet :(

Any one ?

Link to comment
Share on other sites

Ok... found a solution :smile:

 

I had to turn it on it's head and instead of trying to see which merchant it was... as I knew which merchants I was looking for... I check to see if the merchant can see the player instead...

I could also possibly have done it with a quest... but didn't go that route though.

Edited by The-Wanderer
Link to comment
Share on other sites

Once you obtained the merchant reference in the variable, you can use it as you want.

 

You want to check if the merchant is the one you're looking for, ok, who's the one you're looking for?

You're looking for a specific merchant "Mister X"? In this case, you can do:

If ( merchant.GetIsReference MisterXbaseObject )
   ; this is the merchant I need. Do stuff here...
EndIf
Edited by forli
Link to comment
Share on other sites

  • Recently Browsing   0 members

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