open
Function
This opens a closed door.
Syntax
|
$<door_name> open <activator_entity>
|
Notes & examples
|
Syntax-wise, the <activator_entity> argument is required for all doors. In practical terms, there's a nuance. If the argument is included as it should, this is what happens:
- If the door is a rotating door (func_rotatingdoor), the location of the activator entity determines in what direction the door opens and the script doesn't complain.
- If the door is a sliding door (func_door), the door opens normally (it only has one place to go since the direction is set by the entity's "angle" key). The location of the activator entity makes no difference but the script doesn't complain.
If the argument is omitted, this is what happens:
- If the door is a rotating door, then the opening direction is unpredictable because the script can't determine for sure in what direction to open the door and the script complains.
- If the door is a sliding door, this makes no difference because a sliding door "knows" in what direction to slide but the script complains anyway.
So the bottom line is that specifying the argument only really makes a difference for rotating doors although getting an undesirable error message during the game might look silly to the person who will play your map. The reason for the message on sliding doors is that the script has no way of knowing whether your door is a sliding door or a rotating door so it automatically assumes it's a rotating door.
For rotating doors, the best way to avoid any problems is to choose, as the activator, an entity which you know will be on the side of the door that will make it open in the direction you want. Remember, rotating doors always open away from the activator entity.
For sliding doors, the best way to avoid the nagging error messsage is to choose the player (*1) as the activator entity in all cases.
Doors can be closed with the close command.
Note: Do not confuse this command with the open Areaportal command. It is an entirely different command with a different function even though it has the same name.
|
|