47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
Scriptname _00E_DisablePCIfSceneRunning extends ObjectReference
|
|
|
|
;=====================================================================================
|
|
; EVENTS
|
|
;=====================================================================================
|
|
|
|
Event OnTriggerEnter(ObjectReference akActionRef)
|
|
|
|
if (akActionRef == PlayerREF) && (QuestToSet.GetCurrentStageID() == StageRequired)
|
|
if !SceneRequired.IsActionComplete(SceneAction)
|
|
Game.DisablePlayerControls()
|
|
RegisterForSingleUpdate(0.5)
|
|
Else
|
|
Return
|
|
EndIf
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
Event OnUpdate()
|
|
|
|
if SceneRequired.IsActionComplete(SceneAction)
|
|
Game.EnablePlayerControls()
|
|
Else
|
|
RegisterForSingleUpdate(0.5)
|
|
EndIf
|
|
|
|
EndEvent
|
|
|
|
;=====================================================================================
|
|
; PROPERTIES
|
|
;=====================================================================================
|
|
|
|
Actor Property PlayerREF Auto
|
|
|
|
Quest Property QuestToSet Auto
|
|
{The quest associated with this box}
|
|
|
|
|
|
int Property StageRequired Auto
|
|
{Triggerbox will only fire if the stage of the specified quest is equal to this value}
|
|
|
|
Scene Property SceneRequired Auto
|
|
{The scene which should be running}
|
|
|
|
int Property SceneAction Auto
|
|
{The scene action which needs to be completed before the Player controls are enabled again} |