88 lines
2.3 KiB
Plaintext
88 lines
2.3 KiB
Plaintext
|
Scriptname _00E_MQ13c_FailsaveSC extends ObjectReference
|
||
|
|
||
|
|
||
|
;=====================================================================================
|
||
|
; EVENTS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Event OnTriggerEnter(ObjectReference akActionRef)
|
||
|
|
||
|
If !bDone && akActionRef == PlayerREF
|
||
|
|
||
|
If bYaela
|
||
|
PortToPlayerIfNotNearby(MQ13c._00E_MC_YaelaREF)
|
||
|
EndIf
|
||
|
|
||
|
If bRomance
|
||
|
PortToPlayerIfNotNearby(MQ13c.akCompanionRomance)
|
||
|
EndIf
|
||
|
|
||
|
If bKurmai
|
||
|
PortToPlayerIfNotNearby(MQ13c._00E_SC_KurmaiREF)
|
||
|
EndIf
|
||
|
|
||
|
If bNoRomance
|
||
|
PortToPlayerIfNotNearby(MQ13c.akCompanionNoRomance)
|
||
|
EndIf
|
||
|
EndIf
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
Event OnUpdate()
|
||
|
|
||
|
If bRomance && !PlayerREF.HasLOS(MQ13c.akCompanionRomance)
|
||
|
MQ13c.akCompanionRomance.MoveTo(PlayerREF)
|
||
|
bDone = True
|
||
|
ElseIf bNoRomance && !PlayerREF.HasLOS(MQ13c.akCompanionNoRomance)
|
||
|
MQ13c.akCompanionNoRomance.MoveTo(PlayerREF)
|
||
|
ElseIf bKurmai && !PlayerREF.HasLOS(MQ13c._00E_SC_KurmaiREF)
|
||
|
MQ13c._00E_SC_KurmaiREF.MoveTo(PlayerREF)
|
||
|
ElseIf bYaela && !PlayerREF.HasLOS(MQ13c._00E_MC_YaelaREF)
|
||
|
MQ13c._00E_MC_YaelaREF.MoveTo(PlayerREF)
|
||
|
Else
|
||
|
RegisterForSingleUpdate(1)
|
||
|
EndIf
|
||
|
|
||
|
EndEvent
|
||
|
|
||
|
;=====================================================================================
|
||
|
; FUNCTIONS
|
||
|
;=====================================================================================
|
||
|
|
||
|
Function PortToPlayerIfNotNearby(Actor akPortTarget)
|
||
|
|
||
|
If !__Config_bDistanceCheck
|
||
|
akPortTarget.MoveTo(PlayerREF)
|
||
|
bDone = True
|
||
|
Else
|
||
|
If !PlayerREF.HasLOS(akPortTarget)
|
||
|
akPortTarget.MoveTo(PlayerREF)
|
||
|
bDone = True
|
||
|
Else
|
||
|
RegisterForSingleUpdate(1)
|
||
|
EndIf
|
||
|
EndIf
|
||
|
|
||
|
EndFunction
|
||
|
|
||
|
|
||
|
;=====================================================================================
|
||
|
; PROPERTIES
|
||
|
;=====================================================================================
|
||
|
|
||
|
bool bDone
|
||
|
|
||
|
bool Property bYaela Auto
|
||
|
bool Property bKurmai Auto
|
||
|
bool Property bRomance Auto
|
||
|
bool Property bNoRomance Auto
|
||
|
|
||
|
bool Property __Config_bDistanceCheck = False Auto
|
||
|
bool Property __Config_bResetAI = False Auto
|
||
|
|
||
|
float Property __Config_fPortingDistance = 650.0 Auto
|
||
|
{If distance-check is true, when should the NPC be ported to the player?}
|
||
|
|
||
|
_00E_MQ13c_Functions Property MQ13c Auto
|
||
|
|
||
|
Actor Property PlayerREF Auto
|