Table of Contents

Method SetMaxRangedAttackDistanceOverride

Namespace
Anvil.Services
Assembly
NWN.Anvil.dll

SetMaxRangedAttackDistanceOverride(NwBaseItem, float, float, float)

Overrides the max attack distance of ranged weapons.

public void SetMaxRangedAttackDistanceOverride(NwBaseItem baseItem, float max, float maxPassive, float preferred)

Parameters

baseItem NwBaseItem

The base item type.

max float

The maximum attack distance. Default is 40.0f.

maxPassive float

The maximum passive attack distance. Default is 20.0f. Seems to be used by the engine to determine a new nearby target when needed.

preferred float

The preferred attack distance. See the PrefAttackDist column in baseitems.2da, default seems to be 30.0f for ranged weapons.

Remarks

maxPassive should probably be lower than max, half of max seems to be a good start. preferred should be at least ~0.5f lower than max.