Skip to content

attackTiming beta ​

Function of @v12-engine/engine

ts
export declare function attackTiming(world: World, entity: Entity, weapon?: number): {
    swing: number;
    period: number;
    recovery: number;
};

How long an attack of the entity takes: from the start of the swing to the hit (the windup), from one swing to the next, and how long it is held after the hit (AttackDef.recovery). Of its first attack, or the one at that place (UnitTypeDef.attacks), by the speed stat it reads (AttackDef.stats)