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.
 
 
 

25 lines
679 B

Scriptname DefaultDisableSelfOnLoad extends ObjectReference
{disable self on load after quest stage is set}
Quest Property myQuest Auto
int Property disableStage Auto
bool Property bStageMustBeDone = false Auto
{false by default
if true, look for GetStageDone disableStage
if false, look for GetStage >= disableStage}
auto State waiting
event OnLoad()
if (bStageMustBeDone && myQuest.IsStageDone(disableStage)) || (!bStageMustBeDone && myQuest.GetCurrentStageID() >= disableStage)
gotoState("done")
Disable()
endif
endEvent
endState
state done
; do nothing
; note: if ref is reenabled after this state is set, this script will not redisable it
endState