-
Notifications
You must be signed in to change notification settings - Fork 0
/
cf05_guardtriggeraliasscript.psc
36 lines (32 loc) · 1.8 KB
/
cf05_guardtriggeraliasscript.psc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ScriptName CF05_GuardTriggerAliasScript Extends ReferenceAlias
{ Script to handle the security guards, the checks they run, and the scenes they play as a result. }
;-- Variables ---------------------------------------
;-- Properties --------------------------------------
Scene Property GuardSceneToPlay Auto Const mandatory
{ Scene to play when the player enters the trigger volume. }
Bool Property CheckStage Auto Const
{ Determines whether or not to check for a stage vs uniform.
False = Check uniform
True = Check quest stage }
Int Property iStageToCheck = -1 Auto Const
{ Stage to check to determine if scene will play. }
Int Property iStageDone = -1 Auto Const
{ Stage to check to prevent scene playing again. }
Armor Property UniformToCheck Auto Const
{ Uniform to check to determine if scene will play. }
ReferenceAlias Property GuardAliasToCheck Auto Const mandatory
{ The guard alias to check for detection that's in the scene. }
Scene Property CF05_1000_CargoBayGuard01_TeleportPlayer Auto Const mandatory
;-- Functions ---------------------------------------
Event OnTriggerEnter(ObjectReference akActionRef)
Actor PlayerRef = Game.GetPlayer() ; #DEBUG_LINE_NO:30
If (akActionRef == PlayerRef as ObjectReference) && !PlayerRef.IsTrespassing() ; #DEBUG_LINE_NO:32
If !CheckStage && !Self.GetOwningQuest().GetStageDone(iStageDone) ; #DEBUG_LINE_NO:34
If !PlayerRef.IsEquipped(UniformToCheck as Form) && !CF05_1000_CargoBayGuard01_TeleportPlayer.IsPlaying() ; #DEBUG_LINE_NO:36
GuardSceneToPlay.Start() ; #DEBUG_LINE_NO:37
EndIf ; #DEBUG_LINE_NO:
ElseIf !Self.GetOwningQuest().GetStageDone(iStageToCheck) && !CF05_1000_CargoBayGuard01_TeleportPlayer.IsPlaying() ; #DEBUG_LINE_NO:41
GuardSceneToPlay.Start() ; #DEBUG_LINE_NO:43
EndIf ; #DEBUG_LINE_NO:
EndIf ; #DEBUG_LINE_NO:
EndEvent