Does GetItemCount no longer work as a Quest Stage condition?

Post » Tue Nov 20, 2012 12:19 am

Title kind of explains the problem. My teammate needs a quest stage to be triggered when the player picks up a unique apple, but the condition doesn't seem to do the trick.
User avatar
Skivs
 
Posts: 3550
Joined: Sat Dec 01, 2007 10:06 pm

Post » Mon Nov 19, 2012 10:09 am

That condition alone won't set the stage, that just means the stage won't set unless you have the item. The stage needs to be triggered. In effect the quest needs to be told you have the item.

What you want is an OnContainerChanged event script, that

QuestName.SetStage(StageNumber)

Has that in the script. Can't explain much more mate on my phone.
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Tue Nov 20, 2012 12:19 am

Like B1gBadDaddy was saying. The only way you could use getitemcount to set your stage would be to have it in an update loop. Which should be avoided if at all possible. Using OnContainerChanged will actually fire when it happens. Create an alias for the apple in your quest and attach something like this to it:

Quest Property MyQuest AutoActor Property Player AutoEvent OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)  If akNewContainer == Player	MyQuest.SetStage(30)  ;Stage 30 for example  EndIfEndEvent

Might need some more checks and stuff but that should work.
User avatar
Céline Rémy
 
Posts: 3443
Joined: Sat Apr 07, 2007 12:45 am


Return to V - Skyrim