void main() { DelayCommand(10.0,AssignCommand(OBJECT_SELF,ActionCloseDoor(OBJECT_SELF))); object oPC = GetLastOpenedBy(); if (!GetIsPC(oPC)) return; object oTarget; oTarget = OBJECT_SELF; SetLocked(oTarget, TRUE); }