FANDOM


 
m (cross ref linking)
Line 1: Line 1:
[[category:Script_directory:Doors and Levers]]
+
Closing a [[door]] automatically is quite simple. However there is one thing to keep in mind. Closing doors can become very annoying to the players. I suggest only closing doors that are [[area]] [[transition]]s or lead into a large area. Also you will want to make the delay before it closes reasonable. This way [[PC]]s aren’t constantly opening the same door so they can fight a creature that is on the other side.
== Closing a door automatically ==
 
Closing a door automatically is quite simple. However there is one thing to keep in mind. Closing doors can become very annoying to the players. I suggest only closing doors that are Area Transitions or lead into a large area. Also you will want to make the delay before it closes reasonable. This way PCs aren’t constantly opening the same door so they can fight a creature that is on the other side.
 
   
 
Add this script to the doors OnOpen script handle. Change the number 15.0f to whatever. This is the delay in seconds before the door closes. OBJECT_SELF represents the object that the script is attached to. In this case, the door.
 
Add this script to the doors OnOpen script handle. Change the number 15.0f to whatever. This is the delay in seconds before the door closes. OBJECT_SELF represents the object that the script is attached to. In this case, the door.

Revision as of 15:22, April 19, 2007

Closing a door automatically is quite simple. However there is one thing to keep in mind. Closing doors can become very annoying to the players. I suggest only closing doors that are area transitions or lead into a large area. Also you will want to make the delay before it closes reasonable. This way PCs aren’t constantly opening the same door so they can fight a creature that is on the other side.

Add this script to the doors OnOpen script handle. Change the number 15.0f to whatever. This is the delay in seconds before the door closes. OBJECT_SELF represents the object that the script is attached to. In this case, the door.


/////////////////////////////////////////////////////////
// Auto-Close Door
/////////////////////////////////////////////////////////
void main()
{
	DelayCommand(15.0f,ActionCloseDoor(OBJECT_SELF));
}
// End
Community content is available under CC-BY-SA unless otherwise noted.