Skip to content
EvilEngine.Api.Npcs

NpcClass record

public sealed record NpcClass

What a Plugin’s NPC class gives the bodies it spawns.

Assembly
EvilEngine.Api
Commit
4ff877b1

Members

NpcClass constructor

public NpcClass(int Health)

The health a body of the class spawns with.

Health property

public int Health { get; init; }

The health it spawns with. A body that spawns with 0 dies to the first damage it takes.

MaxHealth property

public int? MaxHealth { get; init; }

The most health it can be raised to, or null for what it spawns with.

Agent property

public ContentId? Agent { get; init; }

The agent record its bodies attach when they spawn, giving their hull, movement and brain, or null for bodies that stand as they are.

ModelHealth property

public IReadOnlyDictionary<ContentId, int> ModelHealth { get; init; }

Health by the body’s model where a class gives some models other health, as Half-Life 2’s Combine soldier does its elite.