Jump to content

Setting Stages


Recommended Posts

Greetings all,

 

I would like to ask if anyone has any experience setting stages in quests, I want a stage to begin once all actors from a Referance collection alias have been killed, The actors will cross over multiple cells.

 

Bascially i think it should look something like this

 

if *RefCollAlias*.AllDead()

*Quest*Setstage(50)

 

With the kyquest set to the quest where the alias npcs are.

 

 

I know its not as simple as that but that's basically what I'm trying to achieve.

 

Any help or information would be greatly appreciated, I have my mod working perfectly apart from this part and it would be the last piece of the puzzle.

 

Faceless Wastelander

Link to comment
Share on other sites

never mind I have figured it out, for anyone interested in the same thing;

 

when editing your quest, go to the scripts tab and add: REScript

Inside this script you can add your Reference Collection Aliases (NPCs that need to be dead to start next stage)

Then under the DeadCountGroup set how many RefColAliases there are and how many of the RefColAlias have to die (i.e. all of them) and specify the stage you want to start once this is complete.

 

Hope this helps anyone else in the same predicament.

Link to comment
Share on other sites

So add this script on your quest:

RefCollectionAlias Property caTargets Auto Const ;fill this with needed alias from properties
int myTimer = 10

Event OnInit()
StartTimer(0.1, myTimer)
Endevent

Event OnTimer(int aiTimerID)
  RefCounter()
Endevent

Function RefCounter()
 int count = RefTargets.GetCount()
 int index = 0
 while (index < count)
  actor act = RefTargets.GetAt(index) as actor
  if (act.isDead()==true)
   index += 1
  else
   ;debug.notification("someone is alive") ;you can uncomment this for test
   return
  endif
 endwhile
 if (index == count)
  ;debug.notification("everybody is dead") ; this too
  YourQuest.setstage(50)
  CancelTimer(10)
 endif
endfunction

This isn't the best solution I suppose, but should do what you want...

 

EDIT: So there is vanilla script too, thats definitely better solution.

Edited by shavkacagarikia
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...