enderalse/source/scripts/defaultdisableselfonload.psc

25 lines
679 B
Plaintext
Raw Permalink Normal View History

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