| 03-18-2004, 03:31 AM | #1 |
I'm trying to make melee knockback so when a unit hits another the hit unit gets thrown back (in the direction attacker was facing) but I can't quite figure out how to get all the directional values from the attacker and use them to push the other one back, can anyone help? |
| 03-18-2004, 03:45 AM | #2 |
move unit to position of unit [one being hit] offset by X towards angle between position of attacker and position of unit being hit |
| 03-18-2004, 03:48 AM | #3 |
And that will move it in the direction the attacker is facing? |
| 03-18-2004, 12:54 PM | #4 |
I got the same problem with my starwars map, when a jedi/sith uses the push ability the unit should be thrown back but I just don't have a clue about how it is done, I only know that I need som variable or something... |
| 03-18-2004, 05:02 PM | #5 |
Create a polar offset and center it on attacking unit. Make attacked unit move offset of x and set degrees to attacking unit's facing angle. |
| 03-18-2004, 06:04 PM | #6 |
i got it in some map as spell i guess you just need to use attacker instead of caster and attacked unit instead of target. Unit - Move TARGET instantly to ((Position of TARGET) offset by DISTANCE towards (180.00 + (Angle from (Position of TARGET) to (Position of CASTER))) degrees) |
