Ferc Kast Posted May 26, 2008 Share Posted May 26, 2008 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? Link to comment Share on other sites More sharing options...
Silveredge9 Posted May 27, 2008 Share Posted May 27, 2008 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 More sharing options...
Ferc Kast Posted May 27, 2008 Author Share Posted May 27, 2008 That worked like a charm; Thanks, Silveredge. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.