Jump to content

Home

Lock a door script


Ferc Kast

Recommended Posts

I've tried everything I could think of to script a door locked & closed. However, it only would close. How would I then lock a door via scripting?

 

Use the following script to close and then lock a door. Just replace the TAG_OF_DOOR part with the tag of the door.

 

void main()
{

object oDoor=GetObjectByTag("TAG_OF_DOOR");

AssignCommand(oDoor, ActionCloseDoor(oDoor));
AssignCommand(oDoor, SetLocked(oDoor,TRUE));

}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...