| 06-04-2008, 03:02 AM | #1 |
I'm only theorizing, but are knockback spells simply moving a unit a large number of times in small increments of distance to create the illusion of being knocked back, or are there some tricks in doing that I am not aware of? In particular, I'm worried over collision detection and terrain stuff (such as what happens if a unit got pushed into boundaries where units aren't supposed to be in)? And how would it be best to actually move the hit unit? -Through setting the direction of the attacking unit's to a variable and then moving the defending unit in the direction of the variable? -Using triangles to find out where to move the unit? -Using circles? I have a rough sketch of it in my mind, but I'm not certain how I should implement it. |
| 06-04-2008, 05:43 AM | #2 |
Polar Offset. (ie the first one) If you don't want the target to be stunned by the effect, use call SetUnitX(unit,real) and call SetUnitY(unit,real), as this doesn't interrupt orders. |
