- Joined
- Jan 9, 2006
- Messages
- 27
Well, i am trying to make an ability called "fear"
E: unit casts an ability
C: ability = fear
A: Pick players[all enemys of casting unit]
unit group pick all units owned by picked player in
300 aoe from units point
disable controlling unit
order picked unit to ..*
*HERE is my problem, i have no idea how to calculate it, i want the units to run away from the casting unit eg:
casting unit pos = 250 / 300 picked unit pos = 400 / 800
order picked unit to 1600 / 6400
BUT! IF
casting unit pos = 10000 / 5000
picked unit pos = 9700/ 4700
order picked unit to 1600 / 6400
The problem is i want the unit to run away, depending on the position of both units, in a line where the picked unit could face the casting unit all the time, i hope you understand it and you can help me!
E: unit casts an ability
C: ability = fear
A: Pick players[all enemys of casting unit]
unit group pick all units owned by picked player in
300 aoe from units point
disable controlling unit
order picked unit to ..*
*HERE is my problem, i have no idea how to calculate it, i want the units to run away from the casting unit eg:
casting unit pos = 250 / 300 picked unit pos = 400 / 800
order picked unit to 1600 / 6400
BUT! IF
casting unit pos = 10000 / 5000
picked unit pos = 9700/ 4700
order picked unit to 1600 / 6400
The problem is i want the unit to run away, depending on the position of both units, in a line where the picked unit could face the casting unit all the time, i hope you understand it and you can help me!