2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_MQ11c_BlockDoorActivation extends ObjectReference
|
|
|
|
{This script isn't solely used in MQ11c, don't change and use with care}
|
|
|
|
|
|
|
|
Event OnInit()
|
|
|
|
|
|
|
|
self.BlockActivation(True)
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnActivate(ObjectReference akActionRef)
|
|
|
|
|
|
|
|
If self.IsActivationBlocked()
|
|
|
|
|
|
|
|
If akActionRef == PlayerREF
|
|
|
|
|
|
|
|
If !ConfigSmallerThan && !ConfigEqual
|
2024-01-10 14:08:24 +00:00
|
|
|
If SetQuest.GetCurrentStageID() >= UnlockStage
|
2021-10-05 22:15:58 +00:00
|
|
|
self.BlockActivation(False)
|
|
|
|
Self.Activate(PlayerREF, True)
|
|
|
|
Else
|
|
|
|
_00E_BlockedMessage.Show()
|
|
|
|
EndIf
|
|
|
|
ElseIf ConfigSmallerThan == True
|
2024-01-10 14:08:24 +00:00
|
|
|
If SetQuest.GetCurrentStageID() <= UnlockStage
|
2021-10-05 22:15:58 +00:00
|
|
|
self.BlockActivation(False)
|
|
|
|
Self.Activate(PlayerREF, True)
|
|
|
|
Else
|
|
|
|
_00E_BlockedMessage.Show()
|
|
|
|
EndIf
|
|
|
|
ElseIf ConfigEqual == True
|
2024-01-10 14:08:24 +00:00
|
|
|
If SetQuest.GetCurrentStageID() == UnlockStage
|
2021-10-05 22:15:58 +00:00
|
|
|
self.BlockActivation(False)
|
|
|
|
Self.Activate(PlayerREF, True)
|
|
|
|
Else
|
|
|
|
_00E_BlockedMessage.Show()
|
|
|
|
EndIf
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
ElseIf akActionRef != PlayerREF
|
|
|
|
Self.Activate(akActionRef, True)
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Quest Property SetQuest Auto
|
|
|
|
{The quest that controls the blocking behaviour of the set door}
|
|
|
|
int Property UnlockStage Auto
|
|
|
|
{The stage when the door can be used normally again}
|
|
|
|
Actor Property PlayerREF Auto
|
|
|
|
Bool Property ConfigGreaterThan Auto
|
|
|
|
{Door can only be activated If the current quest stage is higher or equal to the unlockStage}
|
|
|
|
Bool Property ConfigSmallerThan = False Auto
|
|
|
|
{Door can only be activated If the current quest stage is lower or equal to the unlockStage}
|
|
|
|
Bool Property ConfigEqual = False Auto
|
|
|
|
{Door can only be activated If the current quest stage is equal to the unlockStage}
|
|
|
|
Message Property _00E_BlockedMessage Auto
|
|
|
|
{Message that gets displayed If the door cannot be opened}
|