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.
 
 
 

22 lines
699 B

Scriptname DefaultAliasOnDeathScript extends ReferenceAlias
{Sets a stage on the parent quest when the alias dies}
int Property StageToSetOnDeath Auto
{What stage should be set when the alias dies?}
int property PrerequisiteStage = -1 auto
{What stage must be active to set the stage
-1 == do not use and is the default}
event onDeath (actor akKiller)
if PrerequisiteStage == -1
getOwningQuest().SetCurrentStageID(StageToSetOnDeath)
elseif getOwningQuest().GetCurrentStageID() == PrerequisiteStage
getOwningQuest().SetCurrentStageID(StageToSetOnDeath)
else
; debug.Trace(self + " did not set stage " + StageToSetOnDeath + " because prerequisite stage was not set")
endif
endEvent