Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

[SKY]Set a quest stage after killing "X" number of attackers


aragorn58
 Share

Recommended Posts

SOLVED

Being stupid. When I filled the properties in the CK, I filled the DeadAttacker property the same as the TotalAttacker property, which when the game loaded it already had the DeadAttacker_var filled with the number of dead attackers, so when one was killed it automatically set the next stage, because the number was >= the the TotalAttacker.

 

 

 

I'm attempting to advance a quest after killing "x" number of attackers. I have used these two scripts in the past without issue, but for some reason they are no longer working as designed, and I don't know why.
I have placed this script on the actor

Spoiler

 


Scriptname RCDeadAttackerScript extends ReferenceAlias 

RCQuest1Script myQuestScript

Event OnDeath(Actor akKiller)
	; increment dead count
	myQuestScript = GetOwningQuest() as RCquest1Script
	myQuestScript.IncrementDeadAttacker()

endEvent



And this script on the quest

Spoiler

 



Scriptname RCquest1Script extends Quest  Conditional


int Property DeadAttacker Auto Conditional  
{tracks how many bandits are killed}

int Property TotalAttacker Auto Conditional 
{how many bandits do you need to kill?}


function IncrementDeadAttacker()
	DeadAttacker = DeadAttacker + 1
	if DeadAttacker >= TotalAttacker
		setStage(30)
	endif
endFunction
 



After spawning the actors from a holding cell, they all appear where the are supposed to, but if only one of them are killed, the quest stage advances, when 7 are supposed to be killed before the next stage is set.
I have used this same setup in the past not just for actors, but when opening a certain number of doors. And it worked fine. I don't know what I'm missing. The only thing that is different is the actors are being moved form a holding cell and not placed in the world from the beginning.

All the properties have been filled, the first script is attached to several quest Aliases, it is a start game enabled quest and an SEQ file has been generated, due to some dialogue.

Been working on this for two nights and going crazy.   ahhh.gif

 

Any insight will be appreciated. 

Edited by aragorn58
Solved
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...