Jump to content

Scripting Question


David Brasher

Recommended Posts

In a dialog info condition you can check to see if the player is carrying an iron dagger with a condition like this:

 

RUN ON TARGET GetItemCount Weapon: 'IronDagger' >= 1.00 AND

 

 

How do you set up a condition to check if the player is carrying an iron dagger that has been sharpened on a grinding wheel and is something like: iron dagger (fine)?

Link to comment
Share on other sites

So it sounds kind of like the game engine is set up such that you can't easily set up a quest where you need to take a sharpened weapon or tempered piece of armor to a quest-giver. The quest-giver could ask you to smith certain items, but would have no way to sense whether the items were sharpened or tempered and could only ask for the item of any quality.

 

So the quest-giver can ask you to make an iron dagger, but he cannot ask you to make an iron dagger (fine).

Edited by David Brasher
Link to comment
Share on other sites

If you were going to set up your quest like the blacksmithing tutorial, you could do it. Well, I haven't taken a look at it, so I can only guess.

 

The way to do it would be through an OnItemAdded event in a script placed on the player (through a reference alias perhaps).

 

Then you would be able to test each item that gets added to see whether it's an iron dagger, and then whether or not it's been tempered. And when that happens, you set a flag on your quest to enable the dialogue that's supposed to happen when the player has a tempered dagger.

 

Obviously, this could have a lot of problems such as exactly when you should fill the reference alias with the player, the impossibility of finding out whether or not the player already has a tempered dagger, etc...

 

Actually, maybe there is a way. You could have a custom container somewhere, and when you need to check the player for a tempered dagger, you silently remove daggers from the player's inventory one at a time. The custom container would be scripted with the OnItemAdded event to check if any of the daggers have been tempered. Then after the process is over, all the items are silently added to the player again.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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