4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
845 B

scriptName defaultSetStageOnDeath extends actor
{Set stage on specificed quest when this actor dies. Pre-Requistite stage optional}
quest property myQST auto
{quest to set stage upon}
int property preReqStage = -1 auto
{(Optional)Stage that must be set for this script to run. Default: NONE}
int property StageToSet auto
{Set this stage when the actor dies}
auto STATE waiting
EVENT onDeath(actor killer)
if preReqStage == -1 || myQST.IsStageDone(preReqStage) == TRUE
myQST.SetCurrentStageID(stageToSet)
gotoState("inactive")
elseif preReqStage != -1 && myQST.IsStageDone(preReqStage) == FALSE
; debug.trace(self + " was killed before stage " + preReqStage + " of " + myQST + " was set")
else
; debug.trace(self + " got defaultSetSTageonDeath script into a bad state!")
endif
endEVENT
endSTATE
STATE inactive
endSTATE