Jump to content

Grimwar/Entities/func door

From Vellocet Developer Community

All entities

Move owned geometry between closed and open positions.

Placement: Geometry owned by the entity.

Set it up

Parent the door geometry under this entity and choose a local Move Direction. Positive Lip leaves part of the brush in the frame; negative Lip moves it beyond the measured length. open and close outputs fire after movement finishes. A locked door ignores movement inputs until unlocked. Linked Doors records references but does not synchronize motion; call both doors from VSig. Use an SDK spawn-door prefab for a ready-made trigger and door assembly.

Settings

These are the initial authoring values. Script inputs and runtime state are listed separately below.

Setting Default Meaning and choices
move_direction
Move Direction
Front (4) Local direction (relative to this marker) that the door moves when opening. Choices: Up (0), Down (1), Left (2), Right (3), Front (4), Back (5).
speed
Speed
6 Units per second the door moves between closed and open. Minimum: 0.01.
lip
Lip
0 Signed travel inset. Positive values leave this much of the door in-frame; negative values move beyond the measured door length.
reset_delay
Reset Delay
-1 Automatically close after this many seconds once fully open. -1 = never auto close. Minimum: -1.
damage
Damage
0 Damage dealt when this moving door drives into a damageable target. Separating and tangential contacts do not deal damage. 0 disables collision damage. Minimum: 0.
damage_cooldown_seconds
Damage Cooldown Seconds
0.25 Minimum seconds between collision-damage events against the same target. Minimum: 0.01.
start_locked
Start Locked
false If true, the door starts locked and ignores open/close/toggle until unlocked.
start_open
Start Open
false If true, the door starts open.
linked_doors
Linked Doors
[] References only. Use VSig to synchronize the doors. Ordered list. Reference: func_door.
ignore_nav_mesh
Ignore Nav Mesh
true Exclude this entity from navigation-mesh building. This does not disable its gameplay collision.

VSig contract

Use the names below with a ref bound to this entity. The value column describes the catalog value type, not a C# method signature. See Read the reference for arguments, authority, and common controls.

Kind Member Value Authority / access
Input close string Server
Input kill none Server
Input lock string Server
Input open string Server
Input toggle string Server
Input unlock string Server
Output close string Server
Output killed none Server
Output open string Server
Property is_locked bool Server; read/write
Property is_open bool Server; read/write
State state DoorEntityState Server; read/write

Capture ref.state from one matching entity and use ref.restore(saved_state) to restore a compatible snapshot.