FANDOM


m (+category, +wikify)
m (link update & unicode fix)
 
Line 1: Line 1:
Closing a [[door]] automatically is quite simple. However there is one thing to keep in mind. Closing doors can become very annoying to the [[player]]s. 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 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 are not 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.

Latest revision as of 01:34, June 15, 2009

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 are not 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.