I have a quest where the player goes to a civil war camp and kills all the soldiers there. The objective uses a copy of the system from the CW01A quest, from the Fort Hraggstad quest.
The objectives work and update as they're meant to, updating the markers as necessary however, once the npcs are dead the quest doesn't update it's objective.
The scripts are as follows:
Scriptname RSIQuestCampMasterScript extends Quest Conditional LocationRefType Property CWSoldier Auto LocationAlias Property HaafingarCamp Auto Int Property NextStage Auto function checkLocRefTypeAliveCount() int aliveCount = HaafingarCamp.GetLocation().GetRefTypeAliveCount(CWSoldier) if aliveCount > 0 Else ;do nothing SetStage(NextStage) endif EndFunction
This is the script for checking if the aliveCount is > 0, and if it is, it's meant to do nothing as there are still enemies alive. Once it equals 0 though, we're meant to set the stage to the NextStage (which I've set to 15)
;All soldiers killed SetObjectiveCompleted(10) SetObjectiveDisplayed(15) Alias_COHaafingar.SetEssential(False)
This is for stage 15, so once the stage is set the previous objective is completed and the next one is shown. The commander is also set unessential as the next objective is to kill the commander.
Scriptname HaafStormcloakScript extends ReferenceAlias Event OnDeath(Actor akKiller) (GetOwningQuest() as RSICampMasterScript).checkLocRefTypeAliveCount() EndEvent
All of the soldier alias's have this script attached to them, so when they are killed the checkLocRefTypeAliveCount() function is re-run.
Screenshot.jpg 148.24KB 0 downloads
This image shows one of the soldier alias's (the rest are the same as they're just duplicated with a name and reference change)
Conditions 1.jpg 23.08KB 0 downloads
This image shows the conditions on the objective (10) for the first soldier alias.
Conditions 2.jpg 18.73KB 0 downloads
Finally, this image shows the condtions on the objective (10) for the rest of the soldier alias's.
I have no idea what, out of all of this is broken or if anything is. If anyone has any ideas, I'd be grateful.