| 06-17-2006, 10:28 PM | #1 |
My spells is an aura that when the owner of the aura is attacked, the attacking unit is blinked away. I was thinking of using the Unit - Move (Instant) but the problem is, how can I stop it from going into trees? |
| 06-17-2006, 10:55 PM | #2 |
SetUnitPosition() stuff checks collision and such, so a unit will NOT go where it cannot go. (Meaning a ground unit shouldnt get teleported into trees) However, I am not certain if SetUnitPositionLoc() *The Native used by the BJ SetUnitPositionLocFacingBJ* will check the pathing of target location. Either way, a surefire way to check and make it happy. Detect around the point for destructibles/trees and then get some nearby point where there are none. |
| 06-17-2006, 11:07 PM | #3 | |
Quote:
Will be a bit hard since I'm working on GUI (sorry, I didn't say it) |
| 06-17-2006, 11:10 PM | #4 |
SetUnitPosition and SetUnitPositionLoc works in exactly the same way, except that the first one takes reals, the seconds takes a location. It is just called Unit - Move Unit Instantly or something like that in the GUI. |
| 06-17-2006, 11:14 PM | #5 |
*Thanks, Blade* Well, the "Unit - Move Unit Instantly" drops down to SetUnitPositionLoc(..) when converted, so it doesn't even use a BJ unless you tack in the "Facing point/angle" bits. Therefore logically, it should check the pathing of the target point. There must be an error elsewhere, is there JUST enough space for units to squeeze between trees? |
| 06-17-2006, 11:17 PM | #6 | |
Quote:
|
| 06-18-2006, 08:05 AM | #7 |
I remember in my AoS, smaller units like footmen could go between trees if they were half a grid space apart, but heroes were too big, they could only pass if two trees were apart by the width of another tree. So, as long as your trees are clumped together perfectly, or if all your units have a slightly bigger pathing circle than a footman, things should be ok. If not, you could always fill the woods with pathing blockers, as long as trees can't be chopped down. |
