This can be done with the script below with just an added line of code. Keep in mind that the door can't lock until after it is closed. Therefore, the Lock command must be delayed as well. Add this script to the door's OnOpen script handle. Change the number 600.0f to any number; this is the delay in seconds before the door closes. The Word TRUE will lock the door. FALSE will Unlock the door. OBJECT_SELF represents the object that the script is attached to--in this case, the door.
Graph IRI | Count |
---|---|
http://dbkwik.webdatacommons.org | 7 |