Jump to content

Quick question about script on alias


Fantafaust

Recommended Posts

So basically I have a short quest I'm working on, where you retrieve an item from an enemy you have to kill. Everything is going well so far, but when I kill the enemy and the objective changes to retrieve the item taking it from the enemy inventory does nothing

 

I have tried a container change script on the item itself, and on the alias I've used for the item in the quest. No dice

 

So should I place the item in the world (don't want to) or would an alias for the player with a script that watches for the item entering the player inventory work?

Link to comment
Share on other sites

I have never had a problem with this and it is fairly common in retrieval quests. I normally put the container change script directly on the item (not it's Alias you can do but it may not always have one and I like to maintain consistency) to set the next stage. You can have two objectives one for killing and then one for retrieval but I don't normally bother and it allows a player to pick pocket the item if they are that sort of player.

 

If you have done this and it's not working you have something not right somewhere.

Link to comment
Share on other sites

I'm at work right now, but as I recall the script went like this:

 

 

 

Quest property myquest auto

Int property StageToSet auto

 

Event oncontainerchange(Objectreference newcontainer, objectreference oldcontainer)

If newcontainer == game.getplayer()

Myquest.setstage(stagetoset)

Endif

Endevent

 

 

Then I fill in the properties of course.

There may be minor typos, but would that be the gist of a working script?

 

The enemy is an ambush scripted leveled draugr, so no pickpocketing lol

Link to comment
Share on other sites

Well spelling and brackets are important so worth checking and int is not a property:

 

Quest property myquest auto
Int StageToSet

Event oncontainerchanged(Objectreference newcontainer, objectreference oldcontainer)

If (newcontainer == game.getplayer())
Myquest.setstage(stagetoset)
Endif

Endevent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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