Help with an optional quest - two actors to kill.

Post » Mon Nov 19, 2012 1:50 am

Hello!

Here's what I'm trying to accomplish: an optional objective triggered by choosing a specific dialogue line with a specific NPC in the middle of another quest. Let's say, the NPC (who at the same time is the PC's follower), learns about two assassins waiting for her inside her hideout. This presents the PC with two dialogue options:

1. Forget about them, we have more important things to do (this does not trigger the optional objective);
2. Let's take care about these assassins first (this triggers the optional objective - Kill the assassins - with two objective markers.

I can't figure out how to make the game realise that this optional objective is completed. Obviously this will require killing both assassins, and I've been considering these options:

1. Working on stages - setting the OnDeath() events on both assassins progressing the quest to stages 51 and 52, and when both GetStage conditions are met, the quest would be moved to stage 53 and the optional objective will be completed. This, however, will break my main quest, which will still have its primary objective set at stage 50.

2. Using Globals to set eg. Death1 and Death2 to 1 upon death of each actor and have the script check if both these globals are set to 1. As far as I know, I would have to use RegisterForSingleUpdate function to make the game register new values, and this function apparently works only with configurable delay, which means if both assassins are killed at the same time, the values will not be caught correctly. I would probably have to use some kind of repetitive check for both globals running until they are found at 1 and the objective is completed. I have no idea how to go about that, though.

Perhaps there's another, easier solution I am not aware of? Any help will by appreciated.
User avatar
Elina
 
Posts: 3411
Joined: Wed Jun 21, 2006 10:09 pm

Post » Sun Nov 18, 2012 1:25 pm

Stages aren't the same thing as objectives, though--so unless I'm misunderstanding something, if the player chooses dialogue option #2, you could display the new objective, then when the player kills both assassins you could mark the objective as completed, all while never leaving stage 50.
User avatar
Darren
 
Posts: 3354
Joined: Wed Jun 06, 2007 2:33 pm

Post » Sun Nov 18, 2012 5:14 pm

Huh, I guess the easiest solutions are hardest to figure out. Thanks, I'll definitely give it a try.
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Sun Nov 18, 2012 6:07 pm

I think stages are a good way to do it, you just have to add SetStage(53) if player chooses first variant
User avatar
Alexander Horton
 
Posts: 3318
Joined: Thu Oct 11, 2007 9:19 pm

Post » Sun Nov 18, 2012 5:01 pm

A question: how do I check for completed objectives without progressing the quest to the next stage?
User avatar
Angelina Mayo
 
Posts: 3427
Joined: Wed Jan 24, 2007 4:58 am

Post » Sun Nov 18, 2012 9:02 pm

if YourQuest.IsObjectiveCompleted(20)
User avatar
YO MAma
 
Posts: 3321
Joined: Thu Dec 21, 2006 8:24 am


Return to V - Skyrim