19 lines
526 B
Plaintext
19 lines
526 B
Plaintext
void main()
|
|
{
|
|
object oDoor = GetNearestObjectByTag ("Door");
|
|
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);
|
|
}
|
|
}
|