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.
16 lines
635 B
16 lines
635 B
scriptName defaultSetEnableStateOnResetLinkedRef extends ObjectReference
|
|
{Enables or disables this object based on whether the specified linkedref is enabled or disabled.}
|
|
|
|
Keyword property LinkedRefKeyword = None Auto
|
|
{Which linked ref should we check?}
|
|
|
|
bool property OppositeOfParent = False Auto
|
|
{Should this object match the state of the linked ref, or be its opposite? Default: False (Enable if Enabled)}
|
|
|
|
Event OnReset()
|
|
if ((Self.GetLinkedRef(LinkedRefKeyword).IsDisabled() && !OppositeOfParent) || (!Self.GetLinkedRef(LinkedRefKeyword).IsDisabled() && OppositeOfParent))
|
|
Self.Disable()
|
|
Else
|
|
Self.Enable()
|
|
EndIf
|
|
EndEvent |