Skip to content

calcHitChance⚓︎

This event is raised when determining the hit chance for an actor.

--- @param e calcHitChanceEventData
local function calcHitChanceCallback(e)
end
event.register(tes3.event.calcHitChance, calcHitChanceCallback)

Tip

This event can be filtered based on the attacker.baseObject event data.

Tip

An event can be claimed by setting e.claim to true, or by returning false from the callback. Claiming the event prevents any lower priority callbacks from being called.

Event Data⚓︎

  • attacker (tes3reference): Read-only. A shortcut to the mobile's reference.
  • attackerMobile (tes3mobileActor): Read-only. The mobile who is making the attack.
  • hitChance (number): The hit chance for the actor. This may be adjusted.
  • projectile (tes3mobileProjectile, nil): Read-only. The projectile, if applicable, that hit the target.
  • target (tes3reference): Read-only. A shortcut to the target mobile's reference. May not always be available.
  • targetMobile (tes3mobileActor): Read-only. The mobile who is being attacked. May not always be available.