enderalse/source/scripts/_00e_fs_nq02_entriggertravelscript.psc

77 lines
1.7 KiB
Plaintext

Scriptname _00E_FS_NQ02_EntriggerTravelScript extends ObjectReference
int startstage = 180
int endstage = 860
Event OnTriggerEnter(ObjectReference akActionRef)
if akActionRef == PlayerREF
ProcessEnterEvent()
endif
EndEvent
Event OnTriggerLeave(ObjectReference akActionRef)
if akActionRef == PlayerREF
ProcessLeaveEvent()
endif
EndEvent
Function ProcessEnterEvent()
if (FS_NQ02.GetStage() >= startstage) && (FS_NQ02.GetStage() <= endstage)
if _00E_FS_NQ02_TravelState.GetValue() == 0
_00E_FS_NQ02_EsmeEntriggerFollowNotif.Show()
_00E_FS_NQ02_TravelState.SetValue(1)
ElseIf _00E_FS_NQ02_TravelState.GetValue() == 1
_00E_FS_NQ02_TravelState.SetValue(2)
EndIf
_00E_FS_NQ02_EsmeREF.EvaluatePackage()
endif
Return
EndFunction
Function ProcessLeaveEvent()
if (FS_NQ02.GetStage() >= startstage) && (FS_NQ02.GetStage() <= endstage)
if PlayerREF.IsInLocation(_00E_FS_NQ02_Locations) == 1
if _00E_FS_NQ02_TravelState.GetValue() == 0
_00E_FS_NQ02_TravelState.SetValue(1)
EndIf
Else
If _00E_FS_NQ02_TravelState.GetValue() == 1
_00E_FS_NQ02_TravelState.SetValue(0)
_00E_FS_NQ02_EsmeEntriggerStopNotif.Show()
ElseIf _00E_FS_NQ02_TravelState.GetValue() == 2
_00E_FS_NQ02_TravelState.SetValue(1)
Endif
EndIf
_00E_FS_NQ02_EsmeREF.EvaluatePackage()
endif
Return
EndFunction
Actor Property _00E_FS_NQ02_EsmeREF Auto
Actor Property PlayerREF Auto
;Bool IsActivated = false
GlobalVariable Property _00E_FS_NQ02_TravelState Auto
Message Property _00E_FS_NQ02_EsmeEntriggerFollowNotif Auto
Message Property _00E_FS_NQ02_EsmeEntriggerStopNotif Auto
Quest Property FS_NQ02 Auto
Location Property _00E_FS_NQ02_Locations Auto