Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
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
|
|
If SetQuest.GetStage() >= UnlockStage
|
|
self.BlockActivation(False)
|
|
Self.Activate(PlayerREF, True)
|
|
Else
|
|
_00E_BlockedMessage.Show()
|
|
EndIf
|
|
ElseIf ConfigSmallerThan == True
|
|
If SetQuest.GetStage() <= UnlockStage
|
|
self.BlockActivation(False)
|
|
Self.Activate(PlayerREF, True)
|
|
Else
|
|
_00E_BlockedMessage.Show()
|
|
EndIf
|
|
ElseIf ConfigEqual == True
|
|
If SetQuest.GetStage() == UnlockStage
|
|
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} |