• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

help with math

Status
Not open for further replies.
Level 3
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!
 
Status
Not open for further replies.
Top