• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

/boundbox?/ collision,mapbounds & pathing

Status
Not open for further replies.
Level 5
Joined
Sep 22, 2012
Messages
90
I've been doing some "order unit to move(instantly) to point with polar offset"
actions, the thing is I've noticed this pattern in war 3->

dummy unit from top
________________
dummy-> |pathing |
|mapbounds |<-dummy
|unit collision size |
| |
--------------------
dummy unit from bottom

when dummy is from left, it moves down
when dummy is from right, it moves up
when dummy is from top, it moves right
when dummy is from bottom, it moves down

Is there any way to create a custom collision box?
 
Last edited:
Level 5
Joined
Sep 22, 2012
Messages
90
arrow keys

I did that dood, I'm talking about the most efficient way of moving units without hitting the unit's collision size. If you do use a "unit-move unit to point" wherein that point is occupied by a unit/terrain(unpathable)/mapbounds, your unit will move in weird way. Plus I'm detecting units within a circle on my code which is bad. Consider if your unit moved diagonally. I hope someone clears this up for me :(
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
You text picture made no sense to me, so going by this:
when dummy is from left, it moves down
when dummy is from right, it moves up
when dummy is from top, it moves right
when dummy is from bottom, it moves down
I thought you just meant the thing where if a unit is moved into an obstacle, it moves in a perpendicular way.

The thing is that you can't simply "create a custom collision box", you'd need a system the handle collision of all units in your map, which will be much less efficient.

You'll just have to handle it on a case-by-case method:
Unit collision - pick every unit near the unit being moved
Destructables - pick every destructable near the unit being moved
Doodads/terrain/cliffs/bounds - check pathing on the point being moved to

Since you aren't really clear what you're trying to do, here are some vague solutions:
- Make the unit a locust
- Use the trigger action Unit - Turn collision off
- Make the unit a flying unit
- As in my previous post, use SetUnitX / SetUnitY.
 
Status
Not open for further replies.
Top