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.