• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

/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