• 🏆 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!

Different collision (pathing) towards different unit types?

Status
Not open for further replies.
Level 12
Joined
Nov 3, 2013
Messages
989
The question:

How can I make ranged units have a larger collision size towards other ranged units than to melee and player heroes to naturally leave some space between each other for other units to slip past them without taking long detours?

(Basically like how some buildings have a smaller ground collision size than their "unbuildable" pathing size, you prevent other buildings from being built in a larger square than the collision size.)


Why I'm asking for it:

In a lot of maps (including the one I'm tinkering with atm) where units (creep waves) continuously spawn indefinitely and attack move against another mirrored enemy creep wave, like in Dota and League of Legends for instance, if you have a lot of units or high spawn rate (Basically anything that will make surviving units accumulate as you push forward.) they'll stack up into lumps/blobs of units and block each other and, more importantly, the player Heroes...

Generally it's not that bad as long as the amount of units isn't too crazy, but if you have long range units it can still be quite a common occurrence to have units form a parabola that won't let any friendly reinforcements pass through until it's too late.

Reducing pathing size of units does help (sort of) by simply making these lumps take less space, however that isn't my ideal solution...

I want the ranged units to spread out in parabolas (when surrounding units) or straight lines when against similar size creep waves, like it does normally, but still let melee and player heroes walk past them without taking long detours.

I've tried using the "ghost visible" ability combined with "amphibious" movement type to make archers collide with each other but not other units, but having units actually walk straight through the ranged units instead of having the archers leaving some extra space between each other isn't an ideal solution in my book.
 
Last edited:
Level 10
Joined
Apr 4, 2010
Messages
509
EDIT:
I've tried using the "ghost visible" ability combined with "amphibious" movement type to make archers collide with each other but not other units, but having units actually walk straight through the ranged units instead of having the archers leaving some extra space between each other isn't an ideal solution in my book.
I didn't read this properly, it's the same thing :\ Disregard this post.

A while ago, I was playing around with abilities in object editor and I found that the "Mine - exploding (Goblin Land Mine)" ability allows units to walked on, but still have collision of their own. Just set the fields like this (you will need to hold shift to reach those crazy high values). Added test map. NOTE: When you have this ability, anyone can walk over you. Also this ability is not visible.

attachment.php
 

Attachments

  • Walkability.w3x
    18 KB · Views: 63
  • Fields.PNG
    Fields.PNG
    5.3 KB · Views: 120
  • Walability.gif
    Walability.gif
    5 MB · Views: 306
  • Ability.PNG
    Ability.PNG
    215.6 KB · Views: 286
Level 12
Joined
Nov 3, 2013
Messages
989
Im so confused right now.. Anyone can walk on you but still have collision size? What does that supposed to mean??

They collide against each other but not other units (that doesn't have the same passive ability), presumably. Ghost visible ability + amphibious movement type works the same or at least similarly.

Though what I'd like is to have large collisions between ranged units and a smaller one towards melee (instead of none at all). So it's not really relevant to my original post...
 
Status
Not open for further replies.
Top