Jump to content

Grimwar/Entities/func damageable

From Vellocet Developer Community
Revision as of 00:13, 1 October 2026 by DocumentationBot (talk | contribs) (Version 1)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

All entities

Give owned geometry health and a reversible broken state.

Placement: Geometry owned by the entity.

Set it up

Place the geometry beneath the entity. Hide And Disable Collision removes its owned presentation while broken; State Only lets your script control the presentation. damage and heal use maximum health when the amount is omitted or invalid. break can be reversed with reset; kill permanently removes the entity for this map load. A disabled damageable ignores gameplay damage but still accepts reset, heal, and break.

Settings

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

Setting Default Meaning and choices
max_health
Max Health
100 Maximum health before the damageable enters its broken state. Minimum: 1.
start_disabled
Start Disabled
false If true, the damageable starts operationally disabled and ignores gameplay damage.
starts_broken
Starts Broken
false If true, the breakable starts broken (health = 0).
break_presentation
Break Presentation
Hide And Disable Collision (0) Default behavior hides owned renderers and disables owned colliders while broken. State Only keeps the authored presentation and collision unchanged. Choices: Hide And Disable Collision (0), State Only (1).
min_damage
Min Damage
0 Ignore individual damage events below this threshold. Minimum: 0.
reset_delay_seconds
Reset Delay Seconds
-1 Seconds before restoring to full health after breaking. -1 = never auto-reset. Minimum: -1.
allowed_teams
Allowed Teams
None (0) Optional team filter. None means any team can damage it. Supports multiple teams via flags. Choices: None (0), Spectate (1), Order (2), Union (4), All (7).
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 break string Server
Input damage string Server
Input disable none Server
Input enable none Server
Input heal string Server
Input kill none Server
Input reset string Server
Input toggle none Server
Output break string Server
Output damaged string Server
Output disabled none Server
Output enabled none Server
Output healed string Server
Output health_changed float Server
Output killed none Server
Output reset string Server
Property health float Server; read only
Property is_broken bool Server; read only
Property is_enabled bool Server; read only
Property max_health float Server; read only
State state DamageableEntityState Server; read/write

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

This entity supports operational enable/disable. Repeating the current state does not emit another transition. kill is permanent for this map load.