The Door entity is used to turn an animated world model into a controllable door. These doors can be activated (i.e. opened) by player collision, triggers, shooting or some combination of these. The activation of a door can also trigger the activation of other doors, allowing for paired swinging doors and the like.
The fields for the Door entity are:
Field | Description |
---|---|
AnimationSpeed | Speed of door model animation, with 1.0 = 100% of defined speed |
bAudioLoops | if true then sound file loops until opening is done, if false play only once |
bNoCollide | if true then door does not need collision to activate but is controlled by the trigger only |
bOneShot | if true door only activates once, if false door can be activated multiple times |
bReverse | if true collision causes door to reverse direction, if animating |
bRotating | if true door is a rotating (swing) model |
bRunFromList | Animation runs to next time in provided list each time triggered |
bRunTimed | Animation runs specified time increment each time trigger goes from off to on |
bRunToNextEvent | Animation runs until the next event time is reached each time triggered |
bRunWhileTrig | if True animation only runs while trigger is on |
bShoot | if true the door is activated only by shooting, not by player collision |
Model | Model to animate when door is activated |
NextToTrigger | Model of next door to trigger when this door is activated |
ParentModel | Name of parent model |
PlayerOnly | if true then only player can activate the door by collision |
szEntityName | Entity name of door |
szSoundFile | Name of sound file to play when door is activated |
TimeEachTrig | Time animation will run each trigger, only valid if bRunTimed is true |
TimeList | List of times to run animation to each time triggered in the form (1.0 3.5...) only valid if bRunFromList is true |
TriggerName | Name of triggering entity |
UseKey | if true then door can be activated by the Usekey |
When animating the model for a door that can be activated more than once (bOneShot is false), it is important to make the animation cycle back to the starting point. If you don't, the second time the door is activated the model will snap back to the starting point of its animation before continuing its sequence. This looks very odd indeed.
When chaining doors together using the NextToTrigger entry, the model pointed to by this entry must be a model used by another Door entity. Otherwise the entry will be ignored. If that Door entity has a NextToTrigger entry it too will be activated, and so on.
If there is an entity name in the TriggerName entry then the state of that entity is checked to see if the door should be activated. See the Trigger entity for more details about triggered doors.
The bShoot flag is used to switch the collision activation from the player actor to a Projectile actor. This allows doors to be activated only by shooting them.
The bReverse flag is used to make a door reverse its direction if you collide with it while it is opening.
If the bRotating flag is true then it indicates that the door is a swinging door and certain collision detection routines are ignored. This can make it easier to pass through a door while it is opening.
If bRunToNextEvent is true then the door will animate to the next Event time as set by the SetEvent button in the Model tab in the Level editor. The Event String can contain commands to play a sound or cause a trigger. If the Event String contains "S sound.wav" then sound.wav will be played at that Event time. If the Event String contains "T trigger1" then the Trigger entity named trigger1 will be activated the same as if it had been collided with.
Here are some examples of doors in varying different configurations.
|
|
|
Example #1 is a normal door that only opens when the player collides with it. It plays a sound (door.wav) when the door is activated and can be activated multiple times. It also triggers the activation of another door, which uses the model named door03.
Example #2 is a door controlled by a trigger, called trigger1. No collision is required to activate it but it will open only once and then will become totally inactive.
Example #3 is a door activated by shooting it, not colliding with it. It plays a looping sound (door.wav) while it is opening.