Class CompanionDef
Persistent owner-bound slots, attached through EntityTemplate.WithCustomData.
public sealed class CompanionDef
- Inheritance
-
CompanionDef
- Inherited Members
Constructors
CompanionDef(string, int, CompanionMode, float, float, float, float, float, bool, bool, bool, float, PointRuleDef, float)
Creates companion slots for a hero or tower.
public CompanionDef(string templateId, int slots, CompanionMode mode = CompanionMode.GroundEscort, float refillDelay = 1, float formationRadius = 0.5, float followStartDistance = 2, float followStopDistance = 0.75, float acceleration = 8, bool waitOnOwnerDeath = true, bool removeWithOwner = true, bool reconnectOnReturn = true, float initialDelay = 0, PointRuleDef pointRule = null, float rallyRadius = 5)
Parameters
templateIdstringslotsintmodeCompanionModerefillDelayfloatformationRadiusfloatfollowStartDistancefloatfollowStopDistancefloataccelerationfloatwaitOnOwnerDeathboolremoveWithOwnerboolreconnectOnReturnboolinitialDelayfloatpointRulePointRuleDefrallyRadiusfloat
Properties
Acceleration
Follower acceleration and braking rate in world units per squared second.
public float Acceleration { get; }
Property Value
FollowStartDistance
Distance at which a resting follower begins approaching.
public float FollowStartDistance { get; }
Property Value
FollowStopDistance
Distance at which an approaching follower stops.
public float FollowStopDistance { get; }
Property Value
FormationRadius
Ground escort formation radius around the most recent owner movement/rally order.
public float FormationRadius { get; }
Property Value
InitialDelay
Delay before initial population.
public float InitialDelay { get; }
Property Value
Mode
Ground escort or flying follower.
public CompanionMode Mode { get; }
Property Value
PointRule
Ground spawn/reposition terrain validation.
public PointRuleDef PointRule { get; }
Property Value
RallyRadius
Ground-escort rally radius for a tower without barracks. Barracks owners retain their existing rally radius.
public float RallyRadius { get; }
Property Value
ReconnectOnReturn
Reconnect waiting children on owner return; false retires them.
public bool ReconnectOnReturn { get; }
Property Value
RefillDelay
Delay measured from child death/removal, not owner animation completion.
public float RefillDelay { get; }
Property Value
RemoveWithOwner
Retire children on owner removal; false detaches them as independent units.
public bool RemoveWithOwner { get; }
Property Value
Slots
Maximum living or pending children.
public int Slots { get; }
Property Value
TemplateId
Child template identifier.
public string TemplateId { get; }
Property Value
WaitOnOwnerDeath
Return to the owner and suspend attacks/interception while the owner is dead.
public bool WaitOnOwnerDeath { get; }