19 lines
534 B
Plaintext
19 lines
534 B
Plaintext
|
void main()
|
||
|
{
|
||
|
object oDoor = GetNearestObjectByTag ("dt_OuterKeep");
|
||
|
if (GetLocalInt (OBJECT_SELF, "m_bActivated") == TRUE)
|
||
|
{
|
||
|
SetLocalInt (OBJECT_SELF, "m_bActivated", FALSE);
|
||
|
PlayAnimation (ANIMATION_PLACEABLE_DEACTIVATE);
|
||
|
AssignCommand (oDoor, ActionCloseDoor (oDoor));
|
||
|
SetLocked (oDoor,TRUE);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
SetLocalInt (OBJECT_SELF, "m_bActivated", TRUE);
|
||
|
PlayAnimation (ANIMATION_PLACEABLE_ACTIVATE);
|
||
|
AssignCommand (oDoor, ActionOpenDoor (oDoor));
|
||
|
SetLocked (oDoor,FALSE);
|
||
|
}
|
||
|
}
|