-
Member
possible to retrieve target hit box?
I am looking for a way to determine the hitbox size of the unit you're targeting to determine if spells are in range. For normal spells you can check if they are in range, but for AoE spells this is not possible as far as I know. So for the AoE spells you need the hitox size I think.
Anyone has been able to retrieve hitbox sizes?
Thanks in advance!
-
There are a few different radii that may be involved here, but I believe they are all in the unit descriptors. I think what you're looking for is either combat reach or radius.
-
Post Thanks / Like - 1 Thanks
NitroGlycerine (1 members gave Thanks to namreeb for this useful post)
-
I'm having some déjà vu right now 
Originally Posted by
namreeb
I believe that 'melee range' which is what hitbox is usually used to calculate is a function of two variables: the combat reach of the attacker and the bounding radius of the victim. If memory serves, both values are in the object descriptors, and are not necessarily the same values.
Never served a purpose for me personally, but I assume the same goes for AoE spells.
-
Post Thanks / Like - 1 Thanks
-
Member
Thanks guys! I'll have a look at how I can translate those descriptors in a hitbox size.
-
Member
I found out some things about the spell ranges so I thought I'd share. Please let me know if you think there's a mistake, or if it is not correct for certain NPCs.
Combatreach is the combatreach which you can retrieve from the unit descriptors.
Melee range = max(5,combatreach_player + combatreach_target + 1.3)
Melee range is never smaller than 5, but can be larger. Add the combatreaches of player and target together and add 1.3 (apparently 1.3y is the real range of the autoattack spell).
Spell range = spell_range_as_indicated_in_tooltip + combactreach_player + combatreach_target
AoE spell range = aoe_spell_range_as_indicated_in_tooltip + combactreach_target
This is for AoE spells that are originating from the player location.