Jump to content

CrimsonLeader66

Supporter
  • Posts

    3
  • Joined

  • Last visited

Everything posted by CrimsonLeader66

  1. Hi, 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. 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) This image shows the conditions on the objective (10) for the first soldier alias. 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. :smile:
  2. I'm fairly new to scripting so I apologise if this is basic. I have an npc that you have to go talk to, and he has a marker set to show you where he is. It was working fine, as expected. I then changed him to disabled by default as I only want him to exist once the quest starts. I then added an extra stage in-between the start of the quest and when he spawns just to ensure that he definitely exists before the stage where the marker appears. I tested it and he does enable as intended and everything works except his quest marker no longer works, even though I made sure to take extra precautions to ensure he exists when the marker does. I'm wondering maybe I need to set a condition on the marker? I've also included the code for when he spawns and the quest Scriptname LegateSerelliusPropertyScript extends ObjectReference Quest Property MyQuest Auto Int Property MyStage Auto Auto State Initial ;starts when the mod gets initialized Event OnCellAttach() if (MyQuest.GetStage() >= MyStage) Self.Enable() GoToState("DONE") endif EndEvent EndState MyQuest is set to the quest he's linked too and MyStage is 15, this is the fragment for stage 15. ;Spawns the Legate Debug.Notification("Quest at Stage 15") Debug.Notification("Legate Serellius now exists") SetObjectiveCompleted(10) Debug.Notification("Objective 10 completed") SetStage(20) Debug.Notification("Set stage to stage 20") Stage 20 is when the marker should show up Any ideas?
×
×
  • Create New...