• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Size Of Units

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Hello there and greetings :)
I just wanna keep this short and simple
Well, you all know by this function right:

  • Unit Group - Pick every unit in (Units within 150.00 of (Position of (Triggering unit))) and do (Actions)
    • Loop - Actions
Well, I just want to know, what affects the "pickupability" (is that even a word?) of a unit ?

Is it Scaling Value ? Or is it pre-built model animation inside Model Animator ? Is like sphere-like shape of each unit ?

What determines the size of a unit to be pick up inside that area

Well, I see that default Blizzard Immolation has 160 AOE to pick up enemy units around it, therefore something like 100 ~ 150 is the actual size of that unit in that game ?

Just wanna know what size does a unit takes up inside the game :) (theoretical answer is gladly appreciated too :p)
 
Level 11
Joined
Nov 15, 2007
Messages
781
For the "Units in range" function: Nothing. The location the unit occupies is all that it actually checks for. Collision size, scaling value, selection size or model don't factor in at all.

For area of effect of abilities in the Object Editor, it checks collision size when finding a target - however, the area starts at the center of the casting unit regardless of their collision size.

So let's say you have 2 units with a 150 AoE Immolation. One of them has a normal 32 collision size, but the other has a collision size of 400. The 32 collision size unit will be able to burn the 400 collision size unit with its immolation from 550 range away, but the 400 collision unit will have to get within 182 range of the smaller unit for its immolation to work.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
In fairness, the collision size is added to your attack range :) (to both attacker and victim)

JASS:
constant native IsUnitInRange takes unit whichUnit, unit otherUnit, real distance returns boolean
constant native IsUnitInRangeLoc takes unit whichUnit, location whichLocation, real distance returns boolean
constant native IsUnitInRangeXY takes unit whichUnit, real x, real y, real distance returns boolean

Those functions consider collision size. You can build a custom pick function with them.
 
Status
Not open for further replies.
Top