NpcUsageclass

How an NPC fights with a weapon - engagement band, burst cadence and accuracy.

objectNpcUsage
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.BaseCombatWeapon.NpcUsage

Constructors1

Showing 1 constructors

public NpcUsage()PUBLICCONSTRUCTOR

How an NPC fights with a weapon - engagement band, burst cadence and accuracy.

Properties8

Showing 8 properties

public bool Sandbox.BaseCombatWeapon.NpcUsage.CanBePickedUp { get; set; }PUBLICGETSET

Can NPCs pick this up off the ground to arm themselves?

Returns:bool

public float Sandbox.BaseCombatWeapon.NpcUsage.MaxRange { get; set; }PUBLICGETSET

Furthest distance the NPC will attack from.

Returns:float

public float Sandbox.BaseCombatWeapon.NpcUsage.MinRange { get; set; }PUBLICGETSET

Closer than this and the NPC shouldn't attack - back off first.

Returns:float

public float Sandbox.BaseCombatWeapon.NpcUsage.RestMax { get; set; }PUBLICGETSET

Longest rest between bursts, seconds.

Returns:float

public float Sandbox.BaseCombatWeapon.NpcUsage.RestMin { get; set; }PUBLICGETSET

Shortest rest between bursts, seconds.

Returns:float

public float Sandbox.BaseCombatWeapon.NpcUsage.SpreadScale { get; set; }PUBLICGETSET

Spread multiplier when an NPC fires this - how forgiving the weapon is in untrained hands. The NPC multiplies in its own skill and applies the result via `Sandbox.BaseCombatWeapon.NpcUsage.SpreadScale`.

Returns:float

On this page